A federal judge appeared reluctant about the legality of a Trump executive order that bans transgender people from the U.S.