N.Y. Family Court Act § 771
Discontinuation of treatment by agency or institution
If an authorized agency in which a person is placed under section seven hundred fifty-six
(a) discontinues or suspends its work; or
(b) is unwilling to continue to care for the person for the reason that support by the state of New York or one of its political subdivisions has been discontinued; or
(c) so fundamentally alters its program that the person can no longer benefit from it, the person shall be returned by the agency to the court which entered the order of placement.