If infection has been ruled out, an anatomical abnormality like a urethral stricture or polyp can be considered.
The most comprehensive test to evaluate for this would be a cystoscopy - and can be performed by your urologist.
I am not aware of a yeast infection in the stomach leading to such symptoms.
A groin infection may cause referred pain to the penis - but this is uncommon. Imaging the pelvis can rule out infections in this area.
These options can be discussed with your personal physician or urologist.
Followup with your personal physician is essential.
This answer is not intended as and does not substitute for medical advice - the information presented is for patient education only. Please see your personal physician for further evaluation of your individual case.
Kevin, M.D.
kevinmd_