It's a form of masturbation. Haven't you read historic sexual books ? Humans used to do that all the time. Even if you have sex with a person whose gender is the same as yours you still aren't necessarily a homosexual. Sexual orientation is something far more complicated