For a new system to turn on for only 3-5 sec suggests to me three possibilities:
1. You could have a short from mobo to case because of the way you have mounted the mobo in the case. To test this, go to "breadboarding". This means you take the mobo and all components out of the case, and place the mobo on an insulating surface on the table. You mount / connect to the mobo ONLY the bare essentials first: CPU with heatsink and fan, PSU conected, ONE stick of RAM (check the mobo manual for the correct slot to place only one stick), keyboard, and monitor connected to video output. IF your mobo has built-in video, use it and do NOT install any extra video card. But of course, if you have no mobo video, you must install your video card and make sure it has any power supply required plugged in from the PSU. ALSO ensure that the power supply connector for the CPU itself, as well as the main one, is plugged in. Ensure the CPU cooling fan is connected. Now, turn on power and see whether it will complete the POST until it tells you there is no device to boot from. Maybe reboot and enter BIOS Setup to look around, but don't change anything yet. If the system will power up this way, it is basically OK.
Now you can add more system components one at a time. Try adding in all your RAM first and ensure that works. Next add a HDD and see if it still works, even though there is no OS on the HDD to boot from. All this will establish whether the hardware is OK. If yes, disassemble and mount back in the case. This time be VERY sure you have mounting standoffs ONLY where the mobo has matching holes and NOWHERE ELSE. Make sure there are no loose pieces rolling around. Here's an odd one I ran into once: I discovered that, after mounting in the case, there was a springy metal finger at the back (where the mobo ports poke out of the rear cover plate) sticking inside one connector port, instead of being outside of it.
2. Even with good hardware you can get 3 to 5 seconds to turn-off if the CPU cooling is not working, because the CPU WILL overheat to the point that the BIOS shuts down the system to protects it if cooling is poor. Most common causes of this are:
(a) poor physical connection of heatsink to CPU because the heatsink mounting system is installed incorrectly, resulting in misalignment or inadequate contact pressure; or,
(b) poor, or no, or too much thermal contact paste applied between heatsink and CPU. Did you follow the manufacturer's instructions on how to install? If your heatsink came with pre-installed paste, did it also have a plastic film over it that you failed to remove?
The third cause is obvious - if you do not have the CPU cooling fan connected and it does not turn at all, you'll see that. But this normally will take longer than 5 seconds to cause an overheating problem.
3. Last item that could do this is the way your CPU fan speed is monitored. Some BIOS's (not all) have an extra protection system to check CPU cooling. The main system all have is to measure the actual CPU internal temperature with a sensor that is part of the CPU and is monitored by the BIOS. The extra system in some BIOS's watches the CPU cooling fan speed signal (fed from the fan motor to the mobo in the wires from the fan that you plug into the mobo's CPU_FAN port. You DID plug it in there, right? If the BIOS fails to see a good fan speed signal within a few seconds of power-on it will shut down the system without waiting for the CPU temperature to rise. (Some BIOS's do not have this feature). So IF your CPU fan is not turning, or IF there is a poor connection that fails to get the fan speed signal back into the mobo connection, you could see a shut-down for this reason.