There is no magic age when children get to decide where to live. The best interest of the child is the standard.
The law regarding a child's 'right'* to choose is a matter for each State and jurisdiction. The judge in most States, not the child, makes the decision based on the best interest of the child. Although not a standard by any means, many States have begun to give 'consideration' to a child's declaration of custodial preference when the child reaches the age of twelve or thirteen, sometimes fourteen. There are even cases when children of age 9 are allowed to testify. The judge is normally given almost unlimited latitude in whether or not she or he listens to a child and how much weight to give to the child's wishes. In short, there is no specific "age" but the younger the child the less likely for a judge to give the stated preference much weight.
Good luck to you.
NOTE: This answer is made available by the non-MO lawyer for educational purposes only. By using or participating in this site you understand that there is no attorney client privilege between you and the attorney responding. This site should not be used as a substitute for competent legal advice from a licensed MO professional attorney that practices in the subject practice discipline and with whom you have an atttorney client relationship along with all the privileges that relationship provides. The law changes frequently and varies from jurisdiction to jurisdiction. The information and materials provided are general in nature, and may not apply to a specific factual or legal circumstance described in the question.