Rashi on that Passuk (based on the abovementioned Gemara in Sanhedrin) writes that while the event with the blasphemer occurred chronologically at the same time as the one who collected wood on Shabbos, they were incarcerated in separate prisons since it was unclear what punishment the blasphemer would get, while it was known that the wood collector was liable for death.
The Siftei Chachamim explains that the purpose of keeping the blasphemer separate was since it was not known yet whether he would be receive the death penalty, if he would be put in the cell with the wood collector, he would have unjustly suffered grief by thinking that he too was liable to a death penalty, when in truth, at that time, it was unknown what his punishment would be.
Based on that Siftei Chachamim, one can imply that the blasphemer was also uncertain about what his punishment would be, since if he would have known his punishment, it would not have mattered where he was locked up.
שהמקושש במיתה. זה טעם הוא אלעיל למה לא הניחום ביחד ומפרש לפי שיודעין
שזה במיתה אבל מקלל לא היו יודעין שהוא במיתה ושמא לא יהיה במיתה ויצטער
זה שסבר הואיל ויושבין יחד:
That one who gathered wood [on Shabbos]
was [condemned] to death. This is a reason for the above, why he
[Moshe] did not put them together. He [Rashi] explains that this was
because they knew that this one was liable to death, but did not know
whether the blasphemer was liable to death. Perhaps he was not liable
to death and would suffer by thinking, that because they are sitting
together [he too, must be liable to death].