It sounds like it is a Sata M.2, and not an NVME M.2
As a not of caution, when installing windows ONLY have the drive you want to install windows on connected, all other drives should be physically disconnected.
From the spec section of the website:
Intel® Z270 Chipset :
1 x M.2 Socket 3, with M Key, type 2242/2260/2280/22110 storage devices support (both SATA & PCIE mode)*2
1 x M.2 Socket 3, with M Key, type 2242/2260/2280 storage devices support (x4 PCIE mode)*3
6 x SATA 6Gb/s port(s)
Support Raid 0, 1, 5, 10
Supports Intel® Smart Response Technology*4
Intel® Optane™ Memory Ready *5
So one M.2 slot only works with NVME/PCI-E, the other works with both.