A federal judge rejected the Trump administration’s bid to lift an order blocking deportations under an 18th-century law, saying that the people being removed should have a chance to challenge their designation as members of a dangerous Venezuelan gang.