Managed to resolve this now. Needed to set the runtime in the ARM template 'appSettings' for then function:
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~2".
Also, even though I removed the IP restrictions I needed to delete the resource group and deploy it again. When I looked in the automation script in the portal they were still in the script, which would have been causing the error.
Update:
Got another runtime error, this time it was due to WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE missing from ARM template when on a consumption plan. Full ARM template in link below:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-infrastructure-as-code#deploy-a-function-app-on-the-consumption-plan