Her decision to transition from male to female coincided with an unprecedented openness among top military officials in Germany, the United States and other countries to having transgender troops serve openly.