I had several companies in the field when I moved their forts. After the forts were moved, one company did not have a home anymore, because for some reason an new empty company was assigned the moved fort. There seems to be no way to move the soldiers to a new company from the flag interface (if the company does not have a home), or any way to dismiss the company at the fort (only from the flag) and assign the orphaned one to it. The only way is now to disband the orphaned company. But that is bad because I will loose all veterancy stars.
It’s happened to me several times too.
The only times it has happened to me though is upon completion of the upgraded fort. Your issue is similar in effect but different in that it occurred due to moving the fort(s).
The only thing I have found that sometimes fixes the issue for me is to move the fort. Sometimes it works and sometimes it just changes how many are associated with the fort. In your case though that doesn’t sound like a solution.
If you can still control your soldiers, perhaps construction of a new fort would allow you to transfer the soldiers. You would still lose their veteran status but at least retain their equipment.