Any context you can provide would be handy, but I can point to one difference between these two dramatic statements. "Just as soon" suggests that both choices are equal, and presumably undesirable. The other phrasing literally states that the speaker would prefer death to that marriage.
I am sorry for not be able to provide any context, it was my sentence i made up to single out difference between two these phrases, because they seem to have the same meanings. But i would say i always prefer second phrase to first one. So then what is your suggestion? which one do you think i should prefer?