I may help to see the layers panel and the appearence panel. My guess is the line object has no fill and therefore you can see the red fill of the object behind it. In other words, if the red fill is to be on top of that line, then that object must be moved to the front or atleast one higher than the line object. The easiest way to do that is drag the object in the layers panel. Moving up the layers brings it forward and moving down the layers moves it towards the back. So the red layer should be above the line layer.
But thats a guess since I can not see your layers or appearance panels.