If the laptop turns on and then shuts down after 2 seconds, it may be caused by a dying battery, overheating, faulty RAM, the motherboard, or the CPU. According to the Lenovo ThinkPad P50’s documentation, only the battery and RAM modules are replaceable.
Begin by ruling out the battery. Remove it, wait an hour for it to cool off, reinstall it, and check your system. Then, remove it again and try running the laptop without the battery installed.
If it still shuts down unexpectedly, try replacing the RAM. Your PC supports 2133MHz DDR4 SO-DIMM RAM modules, specifically.