Here is how to make a settlement with armed forces as a function of income (the only relevant information?)
Determine settlement category & population size (DMG p173 gives population sizes for different types of settlements) - normally I know what type of settlement I want, so would just roll for population using the metrics given.