Hi there and welcome
If you run a repair disk on the disk within Dick Utility (Command - Option - R)
What does it say about the disk?
It is the internal mothboard that has faulted, it will be the sata port, as you ruled out the hard drive by replacing it
I am really sorry about this and you are going to have to return the mac to have this replaced. It will be covered by the warranty if this has not expired, and the replacement will be done at no cost to you.
I am really sorry about this, and if you have problems, or would like any additional information or assistance, please do not hesitate to let me know.
And if you can take a second to rate my service by clicking one of the stars at the top of the page, then submit, that would be greatly appreciated.