Thanks for your query.Based on the facts that you have posted it appears that you have fungal infection
over inner side of thigh which has spread to penis.
Please take anti fungal medications like Fluconozole along with topical anti fungal jellu Meconazole twice daily.
Ensure to wash your inner wares in boiling hot water mixed with antiseptic solution like Dettol
Please clean your genitals and rest of the affected area with warm water.
It should get cured within a week.