GUEST,BoromirIn any diatonic major scale the interval between the 7th and 8th (octave) is a half step. You can test this on a keyboard playing only the white keys beginning with C. In a D7 (the dominant 7th chord in the key of G) it is indeed a C—the flatted 7th—that is played. C# is the major 7th to a D triad.
In your post you said “...C is the seventh note above D” but in fact it's the flatted 7th.
- Mark