If indeed the associated characteristics are unrelated to the required tasks, then I agree that discrimination based on those characteristics is counterproductive. I would prefer to talk about what is productive, or effective, when it comes to the military, as opposed to "wrong". The military is one of those cases where I'm less concerned about some hypothetical ethic than I am about what works and what doesn't.
I agree with all those who have said that we should look and see if this makes our military better, or worse, and I would agree that the best place to look for that evidence is other nations who have already adopted similar policies.
I just get nervous in debates like this one where what people talk about are rights, and equality, and opportunity.......and a whole lot of things that just aren't very closely correlated with killing people and breaking things.