We ask Allaah to reward you with good for your keenness to seek what is halaal and to rid yourself of the effects of what you did by taking a loan from the riba-based bank. We will answer your question as follows:
Firstly: consuming riba and helping others with it is haraam and is in fact a major sin. Muslim narrated in his Saheeh 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.
A loan in which is stipulated that something extra will be paid to the lender, as the banks do, is haraam and there is no difference of scholarly opinion on this point.
Secondly: You said that you did that as you were unaware that it is haraam. We hope that this means that there is no sin on you because of that. Allaah says in the verses which speak of the prohibition on riba (interpretation of the meaning):
“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)”
It says in Fataawa al-Lajnah al-Daa’imah li’l- Ifta’ (13/352): With regard to the interest that you took before you came to know that it is haraam, then we hope that Allaah will forgive you for that. As for that which you got after you came to know, you have to get rid of it and spend it on charitable causes. End quote.
Thirdly: You do not have to sell the house to the company mentioned or to any other in order to pay of the loan. If it is stipulated in the loan contract that the lender will get some benefit, even if it is haraam, it does not invalidate the loan, so your purchase of the house is valid, and your ownership of it is valid, and you do not have to sell it in order to expedite paying off what remains of the loan to the bank, especially when the ways of dealing with the company you mention, are not free of ambiguity. At the end of your question, you mentioned that they will not buy the house in real terms; if the sale and purchase are done on paper and possession is not really taken of the house before it is sold for a second time, there is the fear that the company’s dealing may be a trick to commit riba in the name of selling.
And Allaah knows best.