Sounds just like you said, a flexibility problem. The muscles you use for a front kick are far different than a round house.
Try stretching at least twice a day and doing muscle conditioning poses for a roundH. Stand on you pivot foot and try holding your leg in a sidekick position for 10 seconds at a time, after a few weeks you will really see a difference in strength.
If this is a SHARP not stretching type pain....
Go to a doctor