I sometimes have to laugh when I see an ad on Craigslist where someone is "re-homing" a parrot, and they make the extremely common statement of "She prefers women and must go to a home that has no men", or "He hates men, so he needs to go to a home with only a woman"...And then the first person the bird comes in-contact with of the gender that they supposedly "hate" and "cannot be around" becomes the bird's immediate best-friend in the world, lol...
99% of the time when parrot-owners make a statement that their bird "hates" a certain gender of people, the truth of the matter is that their bird has only ever been around 1 individual person of that gender, and the bird simply didn't like that person, so this for whatever reason automatically causes their owner to believe that their bird "hates all men" or "hates all women", when in-fact that isn't at all true, their bird simply "hates the one man or the one woman that they've ever had contact with"...And usually there is a very good reason that their bird hates that one, individual person, and that reason has absolutely nothing to do with that person's gender...
It must also be said that there is generally a good bit of denial of a bird's owner in-play when they make this type of blanket-statement about about their bird's "gender-preference"...A lot of the time this denial involves a significant-other, a child, or a friend of the bird's owner that has a history of treating their bird badly, sometimes even a long history of physically or psychologically abusing their bird, and they just don't want to admit to this, or they just can't see it themselves...so it's much easier for the bird's owner to simply believe that their bird must simply "hate all men" or "hate all women"...
The bottom-line is exactly what Wrench stated...Birds like who they like and they dislike who they dislike, just the same way we as people like who we like and dislike who we dislike. And there is always a reason why birds, people, dogs, etc. dislike a particular person. And it generally has nothing at all to do with their gender...
If a bird has a long history of being terribly abused by only men, or only women, over and over and over again, or being verbally assaulted/abused by only men, or by only women, then I'm sure that the bird certainly could develop a "fear" of men or women in-general...But it would have to be a pretty extensive history of the bird being abused repetitively, over time, by only people of that particular gender...And even then, if the bird is re-homed to someone of that gender and they are suddenly treated with nothing but love, kindness, attentiveness, etc. by that new person of that particular gender, in most cases that bird isn't going to steadfastly and consciously refuse to bond or grow-close to that person simply because they are a man or a woman...
Bottom-line...There is always a reason that a bird doesn't like a particular person, same as a dog not liking a particular person. Always a good reason, as they do not form "stereotypes"; we as human-beings are the only species that unfortunately does that...