I am running Powershell version 5.1.19041.1 on Windows 10 2004. There is no Set-NTFSOwner command. After some research I did find a 3rd party NTFSSecurity module here.
https://ntfssecurity.readthedocs.io/en/latest/Cmdlets/Set-NTFSOwner/
Is that module that you are using? If so, you should contact the author for support.
Is there some special requirement that you need to set the file owner? Why don't you just grant access to the user?
icacls.exe $HomeDir /grant "$($user):(OI)(CI)(F)" | Out-File "test.log"
If you just need to set the owner to the Administrators group, you can use:
takeown.exe /a $HomeDir | Out-File "test.log"