I'd try a new battery that you find on the mainboard then read more at https://www.google.com/search?q=IMac+A1419+black+screen
The age is working against you here.
https://www.ifixit.com/Answers/View/337572/iMac+27+Late+2015+-+Black+Screen+After+HDD+Replacement notes how you test with external displays.
I've got a iMac a1419 when I hit the power button it turns on you hear chimes black light than turns on and I see a black thick line in the middle of the screen but dissapears my guess the line is the apple logo does any one know how I could fix it

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic