hi,thanks for query.There could be couple of reason for your pain.One there some nerve
compression at certain level which gives rise to pain.As you can walk for a good distance without major problem things does not seems to be too bad.One possibility is of AVN of femoral head where in the tip of your femur
bone is not getting proper blood supply.The best advise would to go for some investigation like x ray
to have a fair idea about your problem.Do not walk when you are in pain and please do not ignore this for long.
wishing you good health.