How long does it typically take to recover from melanoma?

Dépends on therapy. Depending on the depth of the melanoma, surgical therapy may involve just removal of the tumor and closure of the wound with skin flaps or grafts. If the tumor is deeper, lymph node removal may be indicated. If the tumor is present in lymph nodes, adjuvant chemo after surgery may be recommended. As you may imagine, the more treatment, the longer the recovery.
Right after surgery. Keep in mind that 75% of melanoma would not kill any patient. Among those people, their melanoma rarely spread beyond the original lesion site. So for those "lucky" people, the "cure" happens right after the surgical removal of the lesion. For other 25%, they would never recover from the disease. They eventually die from it.