If the juvenile and domestic relations district court determines from the information provided to it that placement in the prospective adoptive home will be contrary to the best interests of the child, it shall so inform the birth parents. If the birth parents choose not to retain custody of the child nor to designate other prospective adoptive parents, or if the birth parents' whereabouts are not reasonably ascertainable, the juvenile and domestic relations district court shall determine custody of the child.
Va. Code § 63.2-1235