Set the value of the progress bar using the distance system expression:
https://www.scirra.com/manual/126/system-expressions
currentDistance = distance(Sprite.X, Sprite.Y, Goal.X, Goal.Y)
If you want the length of the bar to be a percentage of the distance instead of the exact distance, on start of layout, set a variable originalDistance storing the distance. Then, when you set the width of bar, set it to currentDistance/originalDistance.