A federal judge said deportees must first have a “meaningful opportunity” to seek humanitarian protection in the United States.