String.toCharArray() will give you an array of characters representing this string.
You can change this without changing the original string (swap any characters you require), and then create a new string using String(char[]).
Note that strings are immutable, so you have to create a new string object.