Please get a plain x-ray of the affected area on the thigh. It can be a hematoma
, a muscle spasm or even a fracture
deep in the bone within.
I do not think you have done a permanent damage to your leg. You should be fine soon.
Apply ice packs to the affected thrice daily.