Custody battle

Has anyone gone through custody battle with their baby daddy? He’s a good guys and loves our daughter but we just aren’t good for each other anymore. Our families aren’t from the same states and I would like to move back to my family which is 6 hours from him and his family. Can anyone give me advice?