That's ridiculous.
There are gay pilots at both airlines I've worked at, nobody gives a hoot. There were several at the flight schools I worked at too. The passengers couldn't tell, but it was no secret from co-workers.
How would they even know at an interview? You wear a suit, right? A dark one, with a white shirt, and red tie? Any pilot who deviates far from that is probably not getting hired regardless.
People who interviewed me never knew that I prefer female brunettes with nice butts...if I somehow communicated that, I would not be getting hired either.