The United States military DISCRIMINATES! Do you not understand that? Flat feet, asthma, obesity, frailty, age, homosexuality... you name it, you can be refused entry into military service if you're deemed unfit.
Now I'll ask again, where is your judicial precedent that military discrimination is unconstitutional?
Yes, the military DOES discriminate but what you are describing is “reasonable” discrimination just like a bus company may discriminate against hiring the blind as bus drivers. However, it is not “reasonable” discrimination to not hire someone because their skin color, gender, or because they like to have sex of someone of the same gender. There is nothing “reasonable” that prevents homosexuals from fighting for our country.