@stephen, may be I understood you incorrectly, but I am not sure your approach will work. Consider the graph with 5 nodes as shown in the image.
As your your approach the distances are:
So, your approach will produce, 1, 4, 5, 3, 2
But the correct sequence should be 1, 4, 3, 2, 5 because this sequence is smaller.