There are two issues here.
First, Psalm 19:13 (Heb. v.14) uses נקיתי in the nifal stem. That is passive. Here it means "be free (from guilt), be blameless" 1. On the other hand, Joel 3:21 (Heb. 4:21) uses the exact same form -- נקיתי -- as a piel (active, transitive). It's not common for piel and nifal verbs to be identical in form, but for 1-nun, 3-heh verbs in the imperfect, it happens.
Distinguishing between piel and nifal in this case is contextual. Psalm 19:13(14) has no object (rather, a מ-phrase), and the intended meaning "to be free [from guilt]" is clear. On the other hand, Joel 3(4):21 includes the object דמם and is piel, meaning "leave unpunished", "acquit", or "cleanse". This is a predictable relationship between the nifal and the piel, and it is reflected in translations such as the KJV and Wycliffe, cited by the OP, as well as the footnoted alternative translation in the ESV.2
Second, many modern translations, including ESV, accept a textual variant וְנִקַּמְתִּי, from נקם, "to avenge". Although this conclusion requires a bit of mind-reading of the ESV translators, there are several reliable sources that transparently state their approval/consideration of this variant.
The variant is noted in the apparatus of BHS, the scholarly version of the Hebrew Bible on which the ESV is based.3
With characteristic clarity, the NET footnote explains their choice of translation "I will avenge their blood" as acceptance of the variant.4
The Dictionary of Classical Hebrew includes the possibility of this variant in its entries for both נקם and נקה.1,5
The commentaries explain this.6
The decision about whether נקם or נקה is correct is beyond the scope of this Q&A. The verse is difficult to interpret/translate, and many options have been proposed, none of which is without weakness. One summary of the options is found in Leslie Allen's commentary. The final possibility mentioned there is that accepted by the ESV.
1. All lexical glosses are from Dictionary of Classical Hebrew, Vol. 5 מ-נ, Ed. David J.A. Clines (Sheffield, 2001). The author has categorized every usage in the Hebrew Bible, so the choice of gloss from among the options is not mine but the author's.
2. The note reads: "Or 'I will acquit their bloodguilt that I have not acquitted'".
3. The apparatus reads: "𝔊(𝔖) καὶ ἐκδικήσω (vel ἐκζητήσω), prb l וְנִקַּמְתִּי" . Being "translated": "the Greek witness (supported by the Syriac) read καὶ ἐκδικήσω ['and I will avenge'], with a variant reading ἐκζητήσω ['I will search out']; the Hebrew should probably be read as וְנִקַּמְתִּי ['I will avenge']".
4. The note reads: "the present translation follows the reading וְנִקַּמְתִּי (véniqqamti, “I will avenge”) rather than וְנִקֵּתִי (véniqqeti, “I will acquit”) of the MT."
5. At the piel for נקם it mentions Joel 4:21 as a possible usage: "if em. וְנִקֵּיתִי and I will leave unpunished to וְנִקַּמְתִּי and I will avenge".
6. I will cite only the one linked at the end of this answer: Leslie C. Allen, The Books of Joel, Obadiah, Jonah and Micah, NICOT (Grand Rapids: Eerdmans, 1976), p. 126.