A federal judge said the Trump administration acted illegally when it deported a Maryland man in error to El Salvador, and ordered he be returned.