How would you pay your loan when you do not want to sell your gold? If you have rupees other than gold, you should pay your loan with rupees. In this case, you will have to pay the zakah of the total gold. If you do not have any thing except the gold, then if the remaining gold is equal to nisab after deducting amount equal to the loan, you will have to pay the zakah of the rest gold.
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband