Just had the same problem (ue4.25, msvs2019 16.7.2).
Solved by changing path in Engine\Build\BatchFiles\Build.bat
from
..\..\Engine\Binaries\DotNET\UnrealBuildTool.exe
to actual path to exe: ..\..\..\Engine\Binaries\DotNET\UnrealBuildTool.exe
(which have one “…” more)