President Trump had announced on Twitter in July that he was barring transgender people from serving in the military, though a ban was never fully implemented.