You didn't say if you are male or female so excuse the ignorance, some of the causes are meant for a male. It could be a strain or a lymph node that is swollen. Do you have a small pea like bump near your groin that feels soft to touch but also hurts to touch? That would be a lymph node which usually means an infection or something as silly as a hang nail.
Since it's been going on for a while I'd suggest you get a checkup to make sure nothing is torn instead of just strained or that it isn't something else.
I have a similar pain, more in the groin where the leg meets up, my problem is atrophied muslces and excess scar tissue. Because you exercise it's probably unlikely.
Here are the common causes but there are far more than I have listed here:
Hernia - Occurs when the local support tissues weaken, allowing loops of the bowel to slip from the abdomen into the groin. Usually, but not always, seen as a bulge when standing upright, coughing, or bearing down
Enlarged lymph glands
Testicular torsion
Kidney stone
Orchitis, infection/inflammation of the testicle
Epididymitis, infection/inflammation of the epididymis
Inflammation of the inguinal ligament
Testicular tumor
Superficial skin infection