TT #253 · Parshas Tazria · Aliyah 7 · Passuk 46
English: All the days that the affliction is upon him he shall be impure; he is impure. He shall dwell alone; his dwelling shall be outside the camp.
Torah Temimah cites Arakhin 16b for the measure-for-measure explanation of the metzora’s isolation.
E-Daf — Arakhin 16b · Shas.org · Sefaria — Arakhin 16b, source text and translation
English: Why did the Torah command the metzora to dwell alone outside the camp? Because he separated husband from wife and one person from another; therefore, the Torah commanded him to dwell alone.
Textual derivation
The isolation of the Metzora reflects the measure-for-measure consequence of having separated husband from wife and one person from another through harmful speech.