I had the exact same problem twice, once it was the PSU (one of the fan connectors was shorted which caused the PSU to shut down at once for safety reasons, which btw are many). Make sure all the connections, HDD, SDD, fans...etc are wired properly. what's your PSU?
2nd time was a bent pin on the MB.
Hope that helped.