If I have understood the question, you want a data structure that preserves the order of the keys, that is, the position of the char that replaces the one in the reference sequence for an individual.
I am assuming that you process the items by increasing position order.
Now, since a TreeMap is implementing a Red-Black Tree, it has logarithmic complexity for the basic operations.
If you just need to iterate the sequence in order, you are taking a serious performance hit on each insert.
If my assumptions are correct, I would say you may use a LinkedHashMap.
As the javadoc explains:
This implementation spares its clients from the unspecified, generally
chaotic ordering provided by HashMap (and Hashtable), without
incurring the increased cost associated with TreeMap.
Meaning that you can iterate over your elements in the same order you entered them, but the basic operations have the same complexity as a normal HashMap, with a performance hit due to the linked list handling.
You may picture this as an HashMap traversed by a double-linked list connecting the keys in the order they were inserted.
Please note that I am not addressing the fact that your sequence fits in memory or not. Also, be aware that a LinkedHashMap will take more memory than a simple HashMap.