Sorted list of index values returns list index

I have a list of index values (from List.IndexOf node) and I am trying to sort them into numerical order, but if I use the List.Sort node all it returns is the index value of the list. Anyone know what I am doing wrong / how to fix it?

I think you want List.SortByKey. Make sure your lists are matching length though.

Sorry, I am being very thick. It is working in the example I gave as I only had index values 0 to 22 to sort.

Is this what you are looking for ? Sorts the element in list by the another sorted list(index)