I am having this same problem.
My system is a new build with the following components:
Motherboard: ROG STRIX X299-E GAMING II
Processor: Core I9-9980XE
SSD: Two M.2 SSDs
Graphics Card: EVGA RTX 2080 Ti
HDD: One WD Red 4TB HDD
All the other components work perfect except for the I/O error when I try to initialize the HDD.
When I tried it in another computer it worked perfectly.
I am using AHCI mode in the BIOS for my HDD.
I am booting into Windows from one of the M.2 SSDs.
Please help!!