My 2 cents... a 20" will fit best but as mentioned will be outgrown relatively quickly. 24" will likely be do-able but a touch big and may not help in the confidence area.
I have three girls ages 8, 11 and 13. They were all on a 20" at that age/size.
11 year old is still on a 24" at just over 4'8" and does really well on it. She'll need to be upgraded to something bigger soon though. 8 year old is big enough for a 24", at around 4'5" but still prefers riding the 20".
To STB's point above, wheel size doesn't always dictate the bike size though. The bike in my avatar was an older Trek MT60 which was 20" and really small and they could ride it early on when they were tiny. My 8 year old is on a newer version of the MT60 that is also 20" but it's a much bigger bike all around. I don't think they were sized, but the design sure changed.
A lot of the little mountain bikes are terribly heavy for their size. Two of my girls aren't super into biking, so they are fine with them stock and heavy, but for the one that really loves mountain biking, I stripped hers to the frame and used none of the original parts. In fact, she is telling me to stop working and take her to the Nassau Trails on it right now!