You're right, it's in D (actually A dorian / D ionian)!
I guess I was thinking A aeolian when I started jotting down the melody.
(Key C simply means no sharps or flats to me.)
Check out this post for other examples of numbered melody notation in iReal b...