G is a Premium Economy fare class (not Comfort+) on DL, so I'm assuming OP was booked in Premium Economy on a code-shared VS flight. When OP upgraded, the flight got re-coded as a VS flight, but kept original DL G booking class. VS G fares are an award fare class and hence the system would reject it for mileage earning.
It doesn't keep original DL G class. If it had OP would've gotten credit.
For VS coded flights G is the equal to O on DL code. (Award business class) When upgrading a codeshare the flight number always gets switched to the operating carrier flight number. Awards (including upgrades on partners) are always done this way, under operating carrier flight number. (There's a couple of oddball one-offs) Now booked as VS flight number in G, DL system sees it as an award and doesn't grant credit. Just like why DL codeshares on KLM metal end up getting bonus credit as it gets booked into Z on KL code.
OP, need to call in and male it clear this was an upgrade to a paid ticket. You should get credit for the original booked flight.