As stated in the comments, the asker is okay with roping in non-5E content, so let's look at some options.
Stronghold Builder's Guidebook
This is a third edition book that, as the name implies, is all about building strongholds. However, the rules are flexible enough that you can build basically anything with it (a couple auditoriums, some common areas, a few labs and workshops, barracks-as-dorms, and a number of offices makes for a pretty good university. A workshop with a bedroom above it could easily be a blacksmith's home/shop. And you can use the rules for building curtain walls to build walls around the town. The one thing it is missing is cost to build roads)
It also includes rules for modifying construction costs based on the environment you are building in, and has allowances for available natural resources being around to help reduce costs.
Something to keep in mind is that this book is extremely granular and will be having you pick out doors and locks individually for your rooms. Additionally, the construction prices in this book are pretty high.
Kingmaker
Kingmaker is from first-edition Pathfinder (which is mechanically very similar to D&D 3.5E), while it is technically an 'Adventure Path' it includes an incredibly robust kingdom-building and management system.
Unlike the Stronghold Builder's Guidebook, Kingmaker is much more high-level. Instead of building out your castle piece by piece, you just build "A Castle" and that is that. It has rules for laying out your towns, adding buildings to them, upgrading the connections between them, and so on. Then you eventually move on to claim more land and expand your territory.
Most of the rules are available on the Pathfinder SRD Website
Kingmaker abstracts the cost of building things into Build Points--however, there is a conversion of build points to gp,
1 BP is worth approximately 4,000 gp; use this value to get a sense of how costly various kingdom expenditures are.
and Kingmaker provides a table listing BP costs of roads in various terrain-types. So that can give you a baseline to work off of as well.
It is very important to note, however, that using the Kingmaker Rules fundamentally changes the game you are playing. These rules are very, very involved and tend to shift PCs from roving adventurers to being rulers working on a more political level.
My Suggestion
In your case, it doesn't sound like you really want to fully-absorb the Kingmaker Rules...but you want more civilian options than the Stronghold Builder's Guide gives so. So, my recommendation would be to look at the two rulesets and use them for inspiration to figure out how involved you want them to be in the town--and then use these things as a crude guide to get you pointed in the right direction for what it would take to repair/upgrade/etc all the things your players want to do.
Use them to get a rough ballpark of what things would cost, then go from there and mess with the numbers as suits your campaign.