It is haraam to deal with riba by either borrowing or lending. Allaah says (interpretation of the meaning):
“Those who consume Riba will not stand (on the Day of Resurrection) except like the standing of a person beaten by Shaytaan (Satan) leading him to insanity. That is because they say: ‘Trading is only like Riba,’ whereas Allaah has permitted trading and forbidden Riba. So whosoever receives an admonition from his Lord and stops consuming Riba, shall not be punished for the past; his case is for Allaah (to judge); but whoever returns (to Riba), such are the dwellers of the Fire — they will abide therein”
Muslim (1598) narrated that Jaabir (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) cursed the one who consumes riba and the one who pays it, the one who writes it down and the two who witness it, and he said: they are all the same.
See also the answer to question no. 39829.
If a person takes a loan for haraam purposes, then he cannot be given zakaah unless he repents.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (6/333): If he gets into debt for sinful purposes, such as if he buys alcohol or spends money on zina, gambling, paying singers and so on, he should not be given anything before he repents, because that will be helping in sin. End quote.
Ibn Muflih (may Allaah have mercy on him) said in al-Furoo’ (2/618): Whoever gets into debt because of sin should not be given anything, but if he repents he may be given something. End quote.
It says in al-Sharh al-Mumti’ by Ibn ‘Uthaymeen (may Allaah have mercy on him) (6/235): If a person gets into debt for haraam purposes, can he be given zakaah?
Answer: If he repents we will give it to him, otherwise we will not give it to him, because that is helping in something haraam. Hence if we give him he will borrow money again. End quote.
Based on this, there is nothing wrong with giving this man zakaah funds if he has repented from dealing in riba, and has regretted that and resolved not to do it again in the future.
But if he has not repented from that, and if we give him money to pay off his loan today, he will go and take another riba-based loan tomorrow, then it is not permissible to give him zakaah funds, because by doing so we will be helping him to do something haraam.
And Allaah knows best.