Point taken about origins, however my point stands about the level of commitment in terms of time and resources.The Malayan Emergency, Dhofar Rebellion, Operation BANNER were all in support of functioning governments. The UK were in control of the overall operation and could set the goals and the means.
The Afghanistan-US war was and is a US led operation that overthrew the existing government and tried to set up a completely new government in its place. The Americans went into the war no clear objectives other than to gain revenge for a terrorist attack. Everything after that was just an after the fact fig leaf for finding a way to leave without losing face.
Other countries were only there as a way of supporting the US in order to keep the NATO alliance together or for other diplomatic reasons unrelated to Afghanistan itself. Nobody else had or has any direct interest in what happens in Afghanistan.
So you have two completely different scenarios. In the one case the military are providing security assistance to a civil power, and the civil power are the ones who need to create a political solution to resolve the conflict, with the advice and assistance of the military power as required.
In the second case what could have been a simple punitive expedition turned into a project to create and mould a new state from the ground up for the benefit of a largely unwilling populace, an utterly futile project if there ever was one.