Is it permitted to buy a house that belongs to a church the house wasn’t used for the purpose of a church
In general, we should not be doing business with a church because it is a bais avoda zara, and doing business with them is benefiting the avoda zara. However, in this situation there are one of two factor that might permit it, if applicable. The first one is if the church is not selling this house as part of their usual budget, and they don’t buy and sell houses in order to support the church, then it would be permitted. For example, if the reason they are selling the house is because they got it as a donation from someone, and they have no use for it, and therefore they are selling it, then it would be permitted. This would be similar to what the case in the Shulchan Aruch that it is permitted to buy the used candles off a church, because it is not their usual form of support, in contrast to renting an apartment from them, or using their bathhouse, which is used as a steady support for the church.
Another lenient factor here would be if the church has other people that it can sell the house to, and essentially they don’t need you to buy it from them. Then according to some poskim, it is not considered benefiting them, because they could sell it and get the money from other people
Taz Y:D 143-3, Drisha Y:D 143-4, Commerce and Issurei Hana’ah siman 7, Igros Moshe Y:D 3-34.