I think you just need to reload your shell after having made the changes. Your shell won’t be aware of the changes to PATH or whatever.
FYI, you don’t need to specify this, it’s already the default. Having it in your config though means that in a hypothetical situation where a TLS v1.4 is introduced, it wouldn’t be enabled for your server after an update because your config would prevent it. Best to just leave out that bit of config instead so that Caddy can control the defaults in future updates.
Exec format error means you’re running a binary not built for your platform. make sure it’s compiled for the OS and arch of your system, but you don’t have to compile it on that same system (cross compiling go is easy and our docs explain how). Or just use our download page to get what you need.