Costs? My house in Roswell GA would cost 5x or even more in Washington DC or San Francisco. So building costs are very location, location, location specific. The land costs are HIGHLY variable by location, but so are building materials and labor.
Building costs are usually measured in price per square foot. But that price per square foot is ridiculously variable based on quality, complexity and speed.
So - you can use modern or historical information to fashion a guess. Typically, I just work off of modern comparisons for coming up with an adequate fudge factor. Obviously, to use modern comparisons, you have convert your world's baseline values to modern values. Personally, I like to equate a gold piece to $100 US. And then work from there....
Modern residential construction prices in an 'average' market range anywhere from $40 to $500 per square foot with $100-$150 being "nice" but not too "expensive". So a typical 4000 square foot McMansion would come in at $400K to $600K (in an average market).
Warehouse space? Very cheap - $10 to $30 per square foot.
Peasant dwelling (ie hovel) ? $5 to $20 per square foot.
Inn? Depends... Nice inn? Probably $40 - $80 per square foot. El cheapo inn? $20 per square foot.
Castle? That is going to be military specification. Anything mil-spec is always WAY more expensive since its usually built to be long-lasting and 'tougher', involves special construction techniques (ie relatively unique), and often the timeline is "hurry". So... I dunno... Its going to be relatively spartan craftsmanship-wise so that draws it toward the warehouse cost - but its really "special" that draws in towards high end residential... SO I would venture a guess at $60 to $200 per square foot.
A small castle/fort would need to be EASILY 30,000 square feet. So you would be needing $1.8 to $6.0 million in construction costs. Or using my conversion rate of 1 GP to $100 - you would need 18,000 GP to 60,000 GP to build the castle. Paying and maintaining a garrison would be another matter...
If you prefer square meters - multiply all these numbers by 10 and it will be close enough.
I hope that helps.
Robin