You will get residency immediately when you move back to the states, but residency isn’t the same as residency for tuition purposes. You can pick any state you want and get immediate residency. You will register your cars and get a license and check out library books and buy a fishing license at the ‘in state’ rate. Once you live there 20-30 days, you can vote in elections. Your children can immediately go to public elementary or secondary schools. Residency for tuition purposes is often defined by the state legislature, and sometimes by the school. Some states are 1 year, some longer. It is important to immediately get a license and rental agreement and other anchors to establish a start date.
You would not be instate for NJ, and get no credit for the years you were a resident.