All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad,
, is His slave and Messenger.
The prohibition of the loan is related to the person who borrowed it but not to the very money or whatever the money was spent on.
Therefore, your profits earned in your business are not affected by the fact that the project originated from a Riba-based loan. Hence, if the activity of the business investment is lawful, then there is no harm in benefitting from the profits you earned from it.
You should hasten in repaying the loan, especially if hastening the repayment waives the added interest or some of the amount.
You have done well by abandoning dealing in Riba because among the conditions for the validity of repentance is to abandon the sin and be determined not to return to it.
For more benefit, please refer to Fataawa 346615, 198215, 310777 and 384670.
Allah knows best.