First, let me make a suggestion you don’t seem to have considered. DO THE ROLLOVER and DON’T WITHDRAW THE FUNDS! You will never again in your life get this boost for retirement savings. Clearly you are under 59 since you are worried about the penalty. So just let the account keep growing over the coming years (invest conservatively in an “equity/Income” fund at a place like Fidelity or Vanguard). They will help you do the rollover. That way you don’t pay the penalty and get all that tax-deferred growth!
Second, you’ll have to consult a lawyer about recharacterizing the terms of your divorce. I think you are courting trouble from the IRS either way. Take this GIFT (ok, a payment for your service over the years) and make it work FOR you. Contact Fidelity or Vanguard and let them handle the transfer to avoid taxes.