Assalamu Alaikum,
In my honest opinion. I think one needs to be mature to get married. Unless they are rushed into it by their parents. Or on the other hand, by infatuated love which doesn't last very long. When you get married islamically and both partners have good iman and deen, then I don't think there should be any reason for immaturity to exist.
To answer the question directly, i think Marriage often DOES solve immaturity. Ofcourse theres exception to every rule

. I think once you are married and on your own, as a natural instinct we develop the need to take responsibility, but once again theres exception to every rule

. Especially when you have a child.
If you get married to some one the same age as you and often we see this happen, and actually it is recommended in this day and age that as muslims we get married early so we don't get the desire to hold illicit and illegal relationships such as boy friend , girlfriend. And so if you get married to some one the same age as you or around the same +/- 2-3 years, you can grow together and become mature along side with your partner. But then again there are people who are way too mature for their age and vise verse. But once again there exception to every thing.

. Just my 2cents.