There are a couple of things that stand out to me.
One is a lack of desire, the other is pain.
I don't know if your lack of desire is because of the pain, or those are two separate issues. I'm going to address them as separate, but you know if they are separate or not.
The pain - this can be from many different things. Are you lubricated enough? Is your husband taking enough time to make sure you are fully aroused? Does he do any foreplay? Is the pain more like friction on dry skin, or are you getting pain internally?
If it's internal, it could be from endometriosis, infections, and a lot of other things. Talking it over with your doctor would be a good place to start.
https://www.emedicinehealth.com/pain_during_intercourse/article_em.htm#how_do_health_care_professionsals_diagnose_the_cause_of_painful_intercourse_sex
If you just don't desire sex, you might be asexual, or maybe gray asexual. People who are asexual don't typically experience sexual attraction. Gray asexuality means that maybe you do sometimes, but mostly you don't.
http://www.whatisasexuality.com/intro/
This doesn't just mean you don't desire your husband sexually, but that you don't feel sexual desire for anyone. Only you can answer that.
Is he the only partner you've had? Is he doing things you don't like? Make sure you communicate that to him. It's wonderful that you want to be a good partner for him, but that also means making your preferences known so that you enjoy it more.
None of this is bad, or shameful. Everyone feels sexual desire differently. Start with your doctor to make sure that there isn't anything physically causing your pain, and go from there.