It's absolutely true that weapons can be tools for peace, but I don't think that is how the projects in Afghanistan and Iraq played out. Even with the best intentions the fact that it is a military operation planned by military leaders and staffed by trained military personnel means that you're going to get particular kinds of approaches.
I think the suggestion is to approach these projects as an equivalently resouced mission with different aims and led by different people and to see if the balance of resources they would choose would be different.
Some of this goes into jobs. Occasionally - exceptionally, and less often than most people realise - some of it spins off into useful civilian tech.
But most of it is just free money for nothing much to not very nice people. Some of whom use it to buy political influence. And some of whom use existing political influence to make sure they benefit from it personally.
It's a perfect circle of corruption and moral decay built on foundations of death and terror.