The ruling applies immediately to a group of men the government has sought to send to South Sudan.