Thousands of immigrant children would be left without legal defense due to the end of a federal contract