Volunteering for the military is negotiating a contract.
If the military chooses to regard certain acts as conduct prejudicial to good order and discipline it can do so and charge those in violation of the contract they signed.
Not if the Libertarians prevail over American culture and laws.
Homosexuals: 1.3 Personal Relationships (2008 Libertarian Party Platform)
Sexual orientation, preference, gender, or gender identity should have no impact on the rights of individuals by government, such as in current marriage, child custody, adoption, immigration or military service laws. Consenting adults should be free to choose their own sexual practices and personal relationships. Government does not have the authority to define, license or restrict personal relationships