Perhaps the jurisdiction where you practice is different than the ones I do? In federal court, and the states I'm familiar with, the judge certainly can punish you for disobeying instructions. You take an oath, and the judge orders you, to follow the instructions.
In the situation of jury nullification, though, the judge would have to be punishing a juror for the verdict they supported. That isn't legal at least in the US, a juror can't be instructed to give a certain verdict or punished based on their decision.
Judges will be careful not to directly give instructions against nullification for precisely that reason. They may very well imply that you shouldn't go off the rails of evidence provided or laws and precedent as described, but that's as far as a judge can go with instructions against nullification.