The soldiers advanced toward the border while staying on guard.

Literal

Soldiers [topic-は] be-vigilant [while-ながら] border [toward-に] headed-toward advanced.

~ながら connects two simultaneous actions by the same subject — 警戒しながら means 'while being vigilant.' ~に向かって marks the direction of movement. Both are common constructions in narrative.