From my own experience, my current PCP, as well as the previous one that I had, are women; not to mention several specialists that I've been to over the years. I've also had a number of male doctors.
What's required on the patient's part (which doctors are generally very clear about) is a perceptual boundary between nudity and sexuality.
Criteria for choosing a doctor, in my book, include credentials, a detailed knowledge of his or her field of expertise, a willingness to listen to me and not "talk at" me, and a respectful attitude. I don't see gender as any more a selection factor than her/his race, religion, or shoe size.
It should not matter if your doctor is a female or a male doctor, but you need to feel comfortable during the exam. Usually a man is more relaxed being undressed with and male doctor. During your physcial exam, your doctor will need to check all of your body from head to toe. Heart, lungs, ears, eyes, nose, throat, reflexes, flexibility, just everything including some blood work. The doctor will check you for any possible hernias, your testicles, and penis which requires you to be completely nude. He may also check your prostate. Have you scheduled an appointment? I have always prefered having a male doctor so that if I have any kind of a physical reaction from the exam, he will understand.