Some men are more femininely programmed than most, like some women are more masculinely programmed than most. (Practically all male and female homosexuals I know and talked about that delicate issue have been sexually abused and traumatized in childhood, so this is my personal theory of what tragedy causes this kind of "glitch" in the natural programming)
I do not agree to that. There is a lot more to that, it is much more interesting, and it can be approached by self-experiment.
I am very much into programming and into systems-theory, and the mind is a system and can be programmed - so I enjoy perceiving it that way, and the outcome is often, well, quite interesting. Lets perceive things in a rational, analytic way, instead of an opinionated, politically biased, dogmatic way!
Lets first look at something slightly different: the experience of disgust. There are certain things most people will perceive with disgust, eg. excrements, maggots, ...
Now, we know that very young children do NOT have this perception! That was documented by Sigmund Freud, and anybody having children can verify it. (I myself, as a young boy, was happily carrying around the worms and grubs from the garden into the neighbourhood - they were fascinating creatures of nature, at that time.

)
That means, at some later time that perception of disgust must get programmed into our minds. And so, as it is just programmed, it must be possible to undo that programming.
I might suppose you will have a hard time trying that *eg* - but there are some tricks on how to access these deeper levels of the mental programming.
The sexual preference is placed at a quite similarly deep level of the mind. And, as far as I found out, in the beginning of life this is also an
open EPROM - open to any gender; there is not a preference already set!
Only at a later time the actual preference gets notched in,
on a scale somewhere between homo and hetero. (Nobody is purely hetero and nobody is purely homo, we're all placed somewhere on this scale.)
So yes, you can access this programming, you can play around and experiment with the preferences. You might even be able to slightly change the programming.
Some people might recommend to do such things under the supervision of a therapist. I am a mystician, I think we ourselves have the full right to work on our own programming - but be warned: you might experience unexpected changes to your personality.
Have fun!
P.S.: And don't try these things with drugs. (Yes I know it works with drugs. But don't do it.)