You will probably have to petition the court with jurisdiction over the custody case to permit the name change, and prove that the name change is in the child's best interest (unless the biological father consents).