A federal judge ruled that the Pentagon cannot ban openly transgender troops from serving in the military.