Online first, on arrival as backup
GOV.UK points to applying online through the Immigration & Citizenship Services Authority (ICSA) before you travel, using the "Online Services" tab. Visa on arrival is only for certain categories. Confirm you qualify on the ICSA site before relying on it.
Safety advice
GOV.UK's PNG page says the FCDO advises against all but essential travel to Hela and Southern Highlands Provinces, and to Enga Province except Wabag District. Check the current advice when planning internal travel.