It's not your middle finger you should be looking at, it's your whole hand.
The reason why your finger's the way it is, is because your wrist/back of your hand is facing toward the headstock (at a 45º angle), instead of being parallel with the fretboard.
Your thumb's in the wrong position too. The tip of your thumb should be not be visible when fretting a chord. It should be resting on the back of the neck & it should be the tip of the thumb only resting on the neck, certainly not the heel.
It's a lazy way of holding the uke, and will cause you problems with fretting all sorts of chords, not just a G.
With just the tip of your thumb on the neck, bring your elbow into your side, pivoting on that thumb-tip, to swing the back of your hand round so that it's parallel with the fretboard, rather than being at 45º to it.
If necessary, raise the angle of the fretboard wrt to the ground, until you're comfortable holding the uke with the back of your hand parallel to the fretboard, and the tip of your thumb resting on the back of the neck.