There might be multiple reasons for the pain
1. It could be stone in The ureter
2. Soft tissue pain( muscles )
3. Entritis if it is associated with diarrhea/ fever
Next Steps
get a USG abdomen, pelvis and scrotum.
Health Tips
get yourself physically examined by an urologist