Off the top of my head, I'll wager that if you create a counter that counts the number of times your code executes that while loop, you'll find it does it once.
while (stepper17.distanceToGo() != 3520);
I have doubts that this does what you think it does.
◆ distanceToGo()
long AccelStepper::distanceToGo ( )
The distance from the current position to the target position.