A judge on Wednesday signaled that she was deeply skeptical that the Pentagon's handling of transgender service members complies with federal law.