Get a z270, the z170 is not a good choice for Kaby Lake. Make sure you get a good PSU, Google "PSU Tier List" and pick the most recent post and try to get something in the top 3 brackets, as high as you can spend, this is not a black box part, it is very critical.
If you can, get 16GB sticks if you go with 32GB, that will allow you room to go to 64GB if you need to but ram prices are climbing so if it makes more sense to get 4x 8GB then do it. I wouldn't waste time with a liquid cooler, it isn't really necessary and they are not all that much better unless you go with a full liquid system.
A good fan (Noctua) will be pretty close to the closed liquid cooling systems. You can even go with a cheap Evo cooler for like $25. You don't need much unless you go extreme overclocking, you can get the same overclock 90% of people use with a $25 cooler (if you get a good one). This is what I use and I overclock my cpu https://www.amazon.com/exec/obidos/ASIN/B005O65JXI/lexesto-20/ref=nosim/
For SSD, I would recommend sticking with Samsung EVO series, it is the best option regardless if you go SATA SSD or NVMe.
For the nVidia card I would recommend the MSI Gaming X edition or EVGA (not ideal but popular). I would avoid the founder cards as they have improper cooling, especially for extended 100% loads that you see with ML.
I would use Linux for ML and not Windows. Dual Booting to windows is fine if that is your plan, but Windows is too much of a problem once you get out of Part 1.