You are getting IP addresses in VMhost because they are added to vCenter by IP addresses not FQDN. Below script should provide you desired results. (only the The bold highlighted area has been replaced, Other code is as it is.)
$dcName = "MyDatacenter"
$clusterName = "MyCluster"
$list = Get-Datacenter -Name $dcName | % {
$datacenter=$_
$datacenter | Get-Cluster -Name $clusterName | %{
$cluster = $_
Get-VMhost -Location $cluster | Get-VMHostHBA -Type FibreChannel | where {$_.Status -eq "online"} |
Select @{N="Datacenter";E={$datacenter}},
@{N="Cluster";E={$cluster}},
@{N="VMHost";E={$($_.VMHost | Get-VMHostNetwork).HostName}},
Device,Status,
@{N="WWN";E={((("{0:X}"-f $_.PortWorldWideName).ToLower()) -replace "(\w{2})",'$1:').TrimEnd(':')}}
}
}
#Output CSV to current directory.
$list | export-csv -NoTypeInformation C:\output.csv