Tune the G string and then fret the G string at the fourth fret (B note). Tune your B relative to that. If you still can't get the B in tune then the string could be hanging at the nut or there's a problem at the bridge.
If that works then there's a problem with your electronic tuner.