Washing off an impure substance (najasah) from one’s body or clothes or anything else does not require an intention (niyyah). Rather once the impurity is removed by the accountable person or someone else, then the place becomes pure.
Based on that, when removing an impure substance from the body, it is not stipulated that one should form the intention to do that. Rather it is sufficient to remove it, even if one does not form the intention to do so.
It says in Al-Mawsu`ah al-Fiqhiyyah (29/95): The jurists are agreed that purification from an impure substance does not require an intention (niyyah), so the intention is not stipulated when cleaning oneself of an impure substance, and the place where the impure substance is can be purified by washing it, without forming a specific intention. End quote.
And Allah knows best.