So why that particular phrase then, TheWinner? Why not "Well, I'll go to the edge of the pavement!" or "Well, I'll go to the back of the house!" or any number of other possibilities?
The fact is, there was a well-established, if crude, phrase to express surprise already in existence which went, "Well, I'll go to f...!"
In exactly the same way, "You can go to heck!" became the polite way of saying, "You can go to hell!" Note that the 'h' - just like the 'f' - remains though the rest is altered.
I'm sure many grandmas and grandads used these in perfect innocence but I'm equally convinced that the phrases had a less than innocent origin!