Baked Potatoes Cooked Over a Fire
Two likely possibilities:


The potatoes had too much foil surface exposed and not enough in contact with hot coals, and as a result were just not getting hot enough.  Maybe it was a colder night (were you hiking at altitude?) maybe the coals had a lot of insulating ash, maybe the coals were already too cool (350F is not particularly hot for coals).   This is why burying the potatoes in the coals is more common.
The potatoes you bought were defectively dense.  Apparently potatoes can have a growing problem where the core of the potato is extra-dense due to weather changes, and that core takes forever to cook through.