N.Y. Family Court Act § 541
Order dismissing petition
If the court finds the male party is not the father of the child, it shall dismiss the petition. If a neglect petition was filed in the paternity proceeding, the court retains jurisdiction over the neglect petition whether or not it dismisses the paternity petition.