When you file a divorce petition, you have to serve a copy on your spouse. Even if your spouse agrees to the divorce and agrees with the way you want to divide assets and debts, you must still serve them.
Spouses who wait a long time after separation to legally divorce may lose touch and not know where the other person lives. If that's the case, you can still get a divorce, but you must provide them notice through publication. This is commonly done by posting a notice in the newspaper where you live and the last known place your spouse lived.
Serving your spouse divorce papers through publication requires a court order. You'll need to show the judge that you don't know where your spouse is or how to contact them. If approved, you can then proceed with a default divorce. It's worth noting, though, that default divorces make things like spousal support, or alimony, more up to the court's limited information.