As an almost universal rule, yes you will earn miles on your upgraded ticket - but only the miles based on your original class of service purchased rather than the upgraded class (in other words, no business class bonus miles).
Your best bet is to identify which program's miles you're using and ask your questions in the forum for that airline -- there are various rules that will differ across programs -- such as the fare that you'll have to buy in order to upgrade.
If you're flying non-stop from the US to New Zealand, the only carriers to choose from are Air New Zealand and Qantas. Sure, American codeshares with Qantas and United codeshares with Air New Zealand... but you're not going to be able to use, say, United miles to upgrade the flight.
(If you were trying to upgrade with United miles you'd probably want to fly via SYD so that you could be on United metal for the long flights.)
That's why I suggest you mention what miles you want to use...
Cheers,
Gary