Note: I am not a doctor.
Talk to your doctor, find out if he or she has recommendations. Sometimes it's arousal, but not always, so check to be sure it's nothing specifically physical. And if your doctor suggests therapy, please strongly consider going.
Now keep in mind, there are people who are asexual, and you may very well be one of them. There's nothing wrong with that. But they don't seem to be asexual due to pain -- there are asexuals who've had sex to see what the fuss was all about and there are others in relationships who will have sex to please a partner and be close to them but it doesn't do much if anything for them physically. And of course there are folks who abstain 100%.
But again, I repeat, those tend to be choices and not something they're being boxed into due to pain.
So make an appointment. Your doctor has seen and heard it all, and they are required by law in much of the world to keep your medical stuff 100% private.