Using a 2D array of bools, buildings mark them as true when placed and check against it when moving to see if they can fit
No stacking 100 towers into a single point in this game ;)
Now, do trees block buildings or do buildings knock down trees?
In the game Islanders (really enjoyable if you haven’t given it a go), buildings replace trees.
The trees are really important in your game though, right? The main resource for battling the cold, if I remember correctly. Might be worth blocking buildings, since there seems to be plenty of space to put the buildings in without destroying other things.