Well, I can tell you from experience. I am on opioid medication (morphine and the like) for chronic pain. I have been using the medication for years and will probably need to do so for the rest of my life. After about five years I started noticing all kinds of changes happening to me. I was gaining weight and had very little energy. The one symptom that concerned me the most was a total and complete lack of sexual desire. I’m talking if a NFL cheerleading squad had been naked in my bedroom wanting to have sex with me I would have had zero interest in their offer! It scared me, I had absolutely no clue what was happening to me.
A trip to the doctor unraveled the mystery. It seems that long term opioid use causes a male stop to stop producing testosterone. The solution was to put me on testosterone replacement therapy, injecting myself weekly with testosterone. My testosterone level is back to normal and I have the sex drive of a17 year old now. As a side bonus, I have lost weight and my muscle mass has increased.
So, to answer the question, it would be relatively easy to curb a male’s sexual attraction, castrate him. However, that might not be the answer you are looking for as this option kills his entire sex drive, not just his sex drive towards women. I an not gay or bi, but I would say that it would kill your desire towards any sex, not just toward women.