To transfer a home loan to yourself after a divorce, you need to negotiate with your ex-husband to buy out their share of the property, then formally request a loan transfer from the lender, which will involve submitting necessary documents, paying transfer fees, and potentially undergoing a credit evaluation to qualify for the loan solely in your name.
You cannot typically get the title documents for a jointly owned home if you close the joint home loan without your husband's consent, as both of you are legally considered owners of the property, and removing one person's name from the title would require their signature and agreement, usually through a legal process like a quitclaim deed.
Alternately you can approach court with a suit for mandatory injunction to direct the bank to handover the proerty documents on the basis of repayment of loan made by you through out, but it will be difficult for you to prove the same as the property was purchased jointly and if the transfer of the same to your name by an unregistered deed.
In fact he cannot transfer his share of property in your favor by a registered gift deed because since the property is under mortgage loan, he cannot claim clear and marketable title hence the registrar will not permit him to execute the gift deed by a registered deed.