No it does not mean your gay/bi. If you were who cares.
Anyway, like what was said younger boys get erections all the time for no reason at all.
What really messes with the brain is you being naked. When you get naked the 1st thing to pop into your mind is something sexual, specially if you...
If you know what you have to do...go out an buy different underwear.
Or maybe go buy an athletic supporter. Not one with a cup, just one that will keep the family jewels to keep from flopping around.
I think that will be your best bet.
Good luck!