Get-NaVirtualDiskAlignment currently only supports VHD files. I have captured supporting VHDX files as a feature request to be considered in a future release.
I came to this thread looking for a solution to check alignment on VHDX files and appreciate you letting us know VHD is the only format currently supported. Will be good to see this very helpful tool cover VHDX in the future.