In most cases you will not get a loan for buying house as an individual - you will get a mortgage on your house.
If you have a building company or a company that deals with buying houses then you will be able to get a loan.
IF it is a company and a loan , the origin of the loan does not interest the tax authority , the interest is an expense that is deductible as every other legitimate expense is.
If you are an individual and take a mortgage you can write off the interest on up to $1 million in debt to buy or substantially improve your first or second home (interest on a mortgage for a third home is not deductible unless it is a business or rental property).
Anyway , get an advice from a professional if you really want to know the updated situation regarding the specific loan that you wish to take.
Good luck!