And enacting this ban seems like the worst way to go about correcting any potentially damaging consequences. First of all, it only bans people from joining, it doesn't do anything about the transgender people already serving, meaning that the number of transgender people in the military can't grow. This inflames the bias already surrounding transgender people that you suggest is probably present, and it prevents that bias from waning through increased interaction. If there's any social institution in which differences like this could be overcome, it's the military--"who fucking cares if the person next to you is transgender, when it comes down to it s/he might save your life."
The ban will only reinforce already existing biases and will prevent the formation of transgender in-groups through which transgender individuals might actually provide some kind of psychological support for one another.