Performing marriages is not a judicial act. This is not about the impartiality of judging. Other officials in many states, and clergy of course, solemnize marriages, so it isn't judicial in nature. In Colorado, you can solemnize your own marriage (seriously)! So, it isn't judicial.
It is an administrative government function. American law seems to be relatively clear that a facially valid and neutral law (marriage open to all adults not otherwise married, consanguinity exceptions noted) that is generally applicable cannot be avoided on free exercise of religion grounds absent a clear, convincing showing of intentional discrimination against the religious group. There MAY be limited exception where other constitutional rights are substantially burdened.
The problem for judges is that performing marriages is not so substantial to their jobs that they could not live up to their job descriptions without doing them. So, if the power to marry is not essential to the judge's job, he can simply refuse to marry people and thereby preserve his rights to exercise his faith.
The question of whether a judge SHOULD be forced to make that choice is not a biblical issue. It is a legal/Constitutional issue. No more than it is a biblical issue for me, non-clergy, to decide whether to get qualified to marry people, whether a judge should be forced to marry people at all is not biblical. It is a choice, and it is a non-essential choice, and it lies within the purview of the law since the office of a judge is a creature of civil law in the first place. In other words, it is Caesar's territory. And, by the popular view of things, it is Caesar's call.
If you are going to be a Christian and a judge, you are going to have to make a choice between Gospel obedience and anti-Gospel disobedience. As a judge, you are already sworn to uphold the Constitution and the laws. If the law says you must either marry or not marry at all in order to avoid marrying homosexuals, then it is fully in support of the law to simply say "I'm out of the marriage business."
It is also fully obedient to the Gospel to say the same since there is no biblical warrant for you, as judge, to marry or not marry. If you believe you ought to be able to bring your faith to the functions of your job, then you are doing exactly that by saying you will not marry at all. Your conscience of faith is supported -- not violated -- since you mustn't marry homosexuals by not marrying at all. If the law says you must marry and you must marry homosexuals, different ball game. Then, you have to choose between the white robe and the black one.