Custody cases must be handled in the child's home state. A home state is legally defined as the state where the child has lived for at least the last six months.
If your child has not lived in Alaska for six months, you either need to wait to file, or file for custody in the state they previously resided in. Even if you are waiting to file in Alaska, there is nothing preventing the other parent from filing in the child's home state in the meantime.
If your ex has left state with the child, and you want custody to be handled in Alaska, you will need to file for custody before the child has been gone for 6 months.
Every state has different laws on custody and child support. If your custody dispute ends up being handled in another state, the court will follow the laws of that state, not Alaska, when making custody decisions.