This is a spoonerism:
a transposition of usually initial sounds of two or more words (as in tons of soil for sons of toil)
You will note that, in the transformation of “no stone unturned” to “no turn unstoned,” only one syllable of “unturned” is swapped, and not the entire word, to produce a different, inappropriate word.
A more formal term from linquistics is metathesis:
transposition of two phonemes in a word (as in the development of crud from curd or the pronunciation \ˈpər-tē\ for pretty)
Although that particular definition says “in a word,” transposition of phonemes within phrases is also metathesis. For example, here is Encyclopedia Brittanica using the word metathesis for the Spanish el lagarto becoming the English word alligator, and the National Association of Science Writers using it to describe a napron becoming an apron.
These are not synonyms. A spoonerism is almost always done intentionally, for humor, and the sounds being exchanged are usually further apart. This gives us a play on words, such as a character who does this constantly, saying, “the queer old Dean,” and the audience figuring out that it was really the dear old Queen. More recently, the American comedy troupe “The Capitol Steps” had a routine like this called “Lirty Dies.”
Metathesis is usually a slip of the tongue that switches two sounds that are right next to each other. resulting in a new word.
More general terms, not used exclusively for phonemes, include transposition, rearrangement and permutation.
ETA:
User Justin found two books that specifically refer to “no turn unstoned” or “no tern unstoned” as a spoonerism.