You are confusing two separate, distinctly different issues here. A judge will recuse him or herself if they have a personal bias in or towards the parties to a case, an attorney involved in a case, or the underlying subject matter of the case. (In Wisconsin a judge was strongly reprimanded for NOT recusing herself from cases involving a bank in which her husband was an officer or director. Obviously the thought is that the judge herself could benefit from ruling one way or the other.) In addition to actual bias, usually judges are conscious about recusing themselves, or at least offering to if either party wishes, if there is a mere appearance of the potential for bias. Because that appearance is just as damaging as if there were actual bias, since only the judge would know for certain. If a judge recuses himself the case is then reassigned under local or state rules, either randomly or assigned by the chief judge, usually.
This is distinct from a judge dismissing a case because the court does not have jurisdiction, either over one of the parties, "personal jurisdiction," or over the subject matter of the dispute, "subject matter jurisdiction." In either of those circumstances, unless the relevant statute of limitations has run out, then the plaintiff can attempt to refile the case in a court that DOES have jurisdiction over the defendant, (for instance where the defendant resides), or over the subject matter--e.g. ALL bankrupcy cases and ALL patent cases are heard in federal, not state court, pursuant to the US Constitution, (yes, it's in there). So you can not file for bankrupcy in state court, the court has no jurisdiction. But you can go to the federal courthouse for that same district and file and that court does have jurisdiction, (ceteris parabis, or "everything else being the same.")
There are sometimes instances where there is no Court that has jurisdiction over both the defendant and the subject matter and thus, there is no remedy for the plaintiff. But that is really quite rare.
You need to find out exactly what happened before the first judge and that will dictate how you proceed now.