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.
N.Y. Family Court Law § 541