I ask this because when he foolishly went with Balin and Dwalin (I think) to retake Erebor some years before Thorin and co. actually do. He travels towards Erebor but goes through southern Mirkwood instead of the old forest road. Surely he would have known that Mirkwood was called Mirkwood because of the dark presence lying upon it, the source of which was Dol Guldur, so why did Thrain travel south through Mirkwood?
The short answer is that there's no particular evidence that he did go through southern Mirkwood; he was caught "under the eaves of Mirkwood" and taken to Dol Guldur.
Mirkwood was certainly evil, and almost certainly known by Thráin to be evil, by the time Thráin went there: according to the Tale of Years (Appendix B of the Lord of the Rings)
1050 ... About this time a shadow falls on Greenwood, and men begin to call it Mirkwood.
2841 Thráin II sets out to revisit Erebor, but is pursued by the servants of Sauron.
2845 Thráin the Dwarf is imprisoned in Dol Guldur; the last of the Seven Rings is taken from him.
So why would Thráin have gone into Mirkwood, or wanted to go into Mirkwood, at all?
At the time, according to the section of Appendix A that deals with the Dwarves, Thráin and his people had "made a home in exile in the east of the Ered Luin beyond the Lune," that is, in the eastern Ered Luin, north and west of the mouth of the river Lune. According to the Tale of Years this dates to about 2802 of the Third Age (which however states that their home is "in the South of Ered Luin"; I'm not sure how to reconcile these two statements).
A few decades later (in 2841—as Gandalf says in The Hobbit, "a hundred years ago last Thursday") Thráin became "restless and discontented" (in the words of the Appendix), and decided to try and return to Erebor. He wanted gold; and the Appendix picks up the possibility that the last Ring of the Dwarves was affecting him. To go from the Ered Luin to Erebor, the most reasonable route is roughly the same as Thorin and Company took in The Hobbit: along the Great East-West Road as far as the Misty Mountains, then through the north of Mirkwood, or alternatively skirting around Mirkwood to the north, and so more or less due east to the Mountain.
Although Appendix A doesn't specifically go into Thráin's motivations in picking a particular course for his journey, it does imply that he was trying to take the safer (relatively speaking), more northerly route. But he was a hunted person, and could not simply go where he wished:
It would now seem that as soon as he was abroad with few companions he was hunted by the emissaries of Sauron. Wolves pursued him, Orcs waylaid him, evil birds shadowed his path, and the more he strove to go north the more misfortunes opposed him. There came a dark night when he and his companions were wandering in the land beyond Anduin, and they were driven by a black rain to take shelter under the eaves of Mirkwood. In the morning he was gone from the camp, and his companions called him in vain. They searched for him many days, until at last giving up hope they departed and came at length back to Thorin. Only long after was it learned that Thráin had been taken alive and brought to the pits of Dol Guldur. There he was tormented and the Ring taken from him, and there at last he died.
From this excerpt it's not even clear that Thráin was anywhere near southern Mirkwood. Anduin parallels the western border of Mirkwood for the whole length of the forest; so the dwarves could have been anywhere in the area.
Thus, Thráin knew perfectly well the risk of southern Mirkwood. He didn't go through southern Mirkwood at all. In fact, he didn't get far into the wood, and didn't intend to, apparently; instead, he seems to have tried his best to avoid the area altogether. But he had been chased around since he had left home, and didn't have a choice of which way to go. He was effectively forced to go into Mirkwood—it was not his choice, but Sauron's, and he couldn't avoid it.