The Supreme Court’s decision allows the Pentagon to bar transgender people from joining the military while the lower-court rulings that had blocked the policy are appealed.