I think militaries are ideally suited to do humanitarian work as evidenced by relief efforts usually within a state's own borders done by parts of the local military.
This should be expanded upon, humanitarian corps for helping develop the needy parts of the world and intervening like that instead of securing their own alliances (thinking of NATO and Russia here) continued military dominance.
I think if this kind of a shift in the military's role in future policy making would prevent areas that have a power vacuum, following a undesireable government being removed, from going out of control.
Also, if there is to be a future where the globe harmonizes in terms of equality and human rights; military style organizations would still take their place in society as humanitarian corps in times of disaster. And there might regrettably always be a hostile element in society that needs dealing with, though I do hope that if we create a paradise on earth, that kind of thing might also fade into history.
I wrote about this in a previous blog.