When you say “can’t find DirectX12,” what makes you think that that’s the problem? If you can copy-and-paste the actual error, that might help.
For example, if you’re trying to compile, but don’t have the right Windows SDK installed, then it won’t find DirectX12 headers. This is different from the DirectX12 runtime files, which “make DirectX 12 work.”
Also, it may be that your graphics card supports the DirectX 12 API, but not shader model 6, which is also required to use the DirectX 12 support in Unreal.