Accidentally added the wrong last name to my childrens name?

So i added my old babys fathers last name.. but he doesnt want anything to do with his kids and doesnt want to be in their life so i want to see if i can change their last name to mine instead. ? Is it free? Or do i have to sign papers? And pay?