Unwillingness or inability of the minor's parent, guardian, or person in loco parentis to provide for his care or residence shall not be grounds for the court's refusing to order the discharge of the minor. In that case, a petition may be filed under the Juvenile Court Act of 1987 to ensure that appropriate care or residence is provided.
405 ILCS 5/3-511