How is it America's fault that Afghan police officers are child molesters? I'm sure if Americans had punished them, the Taliban could have PR spun that too to win the hearts and minds of the Afghans. Sounds to me that Afghanistan has big problems with its own citizens they need to figure out for themselves, and no amount of hand-holding by a powerful nation will help them out of the quagmire they are in.
Afghanistan wasn't like South Korea. The Afghans were not super eager for our help, didn't ask for it, and didn't seem super eager to fight along side us to purge an oppressive regime (unlike the South Koreans).