The U.S. military has reversed course and will discharge all active service members who are transgender.