(TLDR; Update your bios before attempting anything. This sounds obvious but a lot of threads in my google adventures clearly didn't do this first.
Also this is a gamble, so if your board doesn't support it then a bios update first will really save you some hassle.)
I just spent a few hours straight with a Z97-A motherboard and the absolute AWFUL hoops I tried jumping through just to figure it out.
So I hope this helps, cause I was kicking myself for too long with the simplest solution.
First, I installed my drive, no problem. It didn't show up in bios or windows, but I found that I needed to change a setting in the bios to enable m.2 compatibility as opposed to pci-e x2 mode.
After that windows detected it, so I went ahead and cloned my drive.
After rebooting and trying to boot from it, I realized it still wasn't there in the bios. So I did some searching. Most people said that z-97 doesn't support booting from NVME, only some boards do, etc. So now I'm really panicking. I turned off secure boot and CSM in bios and was able to install windows from a USB drive. Except it wouldn't continue the install, it would only loop in bios and restart the USB drive's installer.
At this point I had no idea what to do. The drive showed up in windows just fine so I could load it with programs and everything. Format it and assign it a letter. I just couldn't boot from it because the bios wouldn't recognize it. The BIOS
So I updated my bios and BAM it showed up instantly, finished windows installation and loaded fine. So I thought okay, now I'm going to wipe it and re-clone my current boot drive.
BSOD right away.
So It doesn't like being cloned, but it worked with a fresh install. So now I'm here on a Samsung 970 EVO 1TB and it's running flawlessly.
So if you're doing this, make sure you've updated your bios, and that your windows install is fresh for the sake of compatibility.