The move follows a decision in by the Supreme Court protecting gay and transgender employees from being fired or disciplined.
Two senators have offered an amendment aimed at lifting the military's ban on transgender service.
Until Monday's ruling, it was legal in more than half the states to fire workers for being gay, bisexual or transgender.
The suit had been filed against Defense Secretary Mark Esper, challenging the military's current transgender policy.
The officer will have her gender officially changed in the Defense Enrollment Eligibility Reporting System.
A Department of Defense spokeswoman said it is aware of the lawsuit and is reviewing the filings.
The army said in a statement that it concluded the soldier’s operation can be considered a reason for discharge.
A federal judge on Wednesday ordered the Pentagon to turn over thousands of documents.
The legislation still needs to be reconciled with the Senate's version of the national defense bill.
Army Gen. Mark Milley said that readiness has not been compromised by transgender individuals serving in the military.