Hello sorry you are having these confusing thoughts.
In today’s sex filled world I’m not surprised that seeing a women in underwear does nothing for you. As for the men in underwear well it doesn’t necessarily mean you are gay.
After all just because something gives you a erection doesn’t define your sexuality. It just means you have a fetish or a curiosity.
The way I always thought about sexual preferences is if you could see dating someone and building a relationship with someone of the same sex.