Yes, both are valid constructions with some slightly different meaning.
etwas in Ordnung bringen --> unbreak or fix something. Restore to proper or normal state, function, operation etc.
Ordnung in etwas bringen --> restore order (e.g. "Ordnung in dies Arbeitsgruppe bringen", meaning to assign tasks in a working group, stop the chaos and get everyone up to speed of what they have to do), tidy or clean up (e.g. when referring to "Ordnung ins Chaos in der Wohnung bringen", putting things back in their appropriate places, tidying up)
So to the sentences at hand it's only nuances for the first one:
Bring Ordnung in Dein Leben! --> Restore order in your life, get a clear(er) schedule, don't take on too many tasks
Bring Dein Leben in Ordnung! --> (the subtext is that the person is somewhat a failure in life) Get your priorities sorted, stop doing detrimental stuff to your health and sociosphere etc.
The two sentences concerning police IMHO only the first makes sense:
Die Polizei versuchte Ordnung in die Reihen der Demonstranten zu bringen --> bring order to the group of people. Thus would mean to stop violence - or keeping different opposing demonstrations appart from eachother.
Die Polizei versuchte die Reihen der Demonstranten in Ordnung zu bringen --> it's kinda funny and only makes sense when they try to arrange in nice lines and there are a few police people who direct them like "a bit more to the left", "a bit more to the right" etc to make a nice pattern or so for a piece of performance art where people are properly lined-up - unlikely in this context.