Not that I agree with being in Afghanastan for 20 years but the military did exactly that "nation building" in Japan and West Germany after WWII.
You cannot Nation Build when a country is stuck in the 7th Century.