I am pretty far into the game, and I chose stormcloak over imperial. Doing this made the first jarl Balgruuf go away and the new one replace him. I didn't know about the quest at the time, therefore I didn't get the quest done. Is there any other way to obtain the artifact and do the quest now that I've gone far?
According to The Elder Scrolls Wiki's entry on that quest:
After hearing a rumor at the Bannered Mare, and only the Bannered Mare, talk to Jarl Balgruuf in Dragonsreach (if you sided with the Stormcloaks in the Civil War, he is in the basement of the Blue Palace).
So if Balgruuf was ousted, you should be able to find him in the Blue Palace in Solitude, and continue the quest, with a little extra travel time between Balgruuf and the location of the quest.