Here is a small script that will enable you all to change a SharePoint Web Application name .
We can use the following SharePoint PowerShell script:
$renameWApp=Get-SPWebApplication | where {$_.Name -match "Old Web Application Name"}
$renameWApp.Name="New Web Application Name"
$renameWApp.Update()
$renameWApp.Name="New Web Application Name"
$renameWApp.Update()