迷う: getting lost on a route or hesitating over a choice
Compare passing the same corner twice with finally choosing blue after hesitation, reading the target of 迷う and the result that follows.
Getting lost and passing the same place
迷う (まよう) can mean to get lost or to hesitate. “道に迷って同じ角を二度通った。” says that the speaker got lost and passed the same corner twice.
道に connects the situation to finding a route. 同じ角を二度通った reports two passages past the same corner, without establishing a round trip along the entire route.
Hesitating before making a choice
In “どちらの色を選ぶか迷った末、青に決めた。”, the speaker hesitated over which color to choose and finally chose blue. どちらの色を選ぶか identifies the content of the choice.
Read 青に決めた after 迷った末: the hesitation was followed by a decision. Do not leave the speaker still unable to choose at the end of the sentence.
Use the target and the following result
The route example presents 道 and a corner passed twice; the color example presents a choice and its eventual decision. Do not read both scenes as physically getting lost merely because both use 迷う.
The reason for choosing blue is not supplied. Preserve the stated target and final decision rather than inventing a cause for the hesitation.
Was a decision made by the end of the color example?
Show the answer and why
Yes. After hesitating over the color, the speaker chose blue, as stated by 青に決めた. Unlike the route example, it describes the content of a choice and its result rather than a path traveled.

