Windmill is a town building. So you might have to sell a cottage, farmhouse, or marketplace or tavern . I hope this works.
Do you have a lot of one of those?
I'm not too sure about this answer because I have several of those types of buildings and have had no problems with buying more.
Something doesn't seem right unless you have a lot!