A federal judge ruled Wednesday that the Trump administration can continue efforts to withhold tens of millions of dollars meant to cover hotel costs for migrants in New York City.