Hello,
Welcome to the ehealthforum and I am really glad to help you out. To me it appears a psychological problem rather than a medical one. It looks like that you are having vaginismus. It is a condition where there is involuntary tightness of the vagina during attempted intercourse.
The tightness is actually caused by involuntary contractions of the pelvic floor muscles surrounding the vagina. Treatment involves extensive therapy that combines education, counseling, and behavioral exercises. I would suggest you to consult a gynecologist and get other causes of dyspareunia also ruled out.
Also talk to your partner openly about any apprehensions and consult a counselor for any relationship issues. It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care.