one more time.In the key of G, D is the dominant chord. C is the seventh note above D. Because we are in the key of G, C occurs naturally. So the seventh of the dominant is not flatted, but natural.
If we added a seventh to the tonic (G), it would be a major seventh because F is sharped within the G scale. We can flat that F# to F natural. Then it would be referred to as a flatted seventh.
We then can resolve the resulting chord (G7) to the subdominant (C) of the key. It is also possible to resolve the chord to A minor (known as a deceptive cadence). We could also resolve to an F# chord or B chord treating the minor seventh as an augmented sixth.