High court lets military implement transgender restrictions