Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
I think that, since the black line appeared on your screen after you removed the front panel and worked on the interior of the iMac, and since a 'black line' basically means data or input (to the display panel) lacking, then you must have pulled loose a connector (video connector doubtless) to the screen, in disassembling, changing the drive, or in reassembling.
You will have to do the operation over, only without removing the SSD, and looking carefully at anything whatever that you might have pulled on, pulled out, crimped, strained, etc. Reseating video connectors and and examining all cables, is especially recommended.