Tonga appears to be about 570 miles from Nugent Island (the northernmost point in New Zealand). This seems to be much closer than Vanuatu is to any part of New Zealand.
Uninhabited offshore islands are excluded from calculations. But otherwise yes, Tonga is 918 km /570 mi from Nugent Island which is a wee rock just off the live volcano of also-uninhabited Raoul Island. The distances from New Zealand's inhabited islands are 1602 km / 995 mi to Vanuatu and 1852 km / 1151 mi to Tonga.
I'd be curious to see one where you find the closest continental country for all island countries!
I suspect Philippines might be closer to Vietnam than Brunei but I don't really know who the islands in that area belong to