My suggestion is:
Ad silvam ii ne moriturus/moritura invenirem me non vixisse.
The two options are for masculine/feminine speakers.
I will assume a male, as the author appears to have been one.
Using one participle (moriturus) and an AcI (me vixisse) the structure becomes clearer.
I am sure one can concoct a Latin translation with four nested clauses, but that easily becomes jarring and difficult to parse.
To understand how this works, you can first strip the participle and the AcI:
Ad silvam ii ne invenirem.
I went to the woods so that I would not discover.
This, I think, is the core of the construction in English as well.
To reach the full desired meaning, we add the participle moriturus ("when I am/was about to die") and the object me non vixisse ("that I have/had not lived").
This is an important translation strategy:
First strip the sentence to just its core.
Don't worry about throwing away negations and important details.
If there are several clauses, you may first want to translate them in isolation and only later combine them.
If you identify the main clause and add details little by little, you will often translate much better — and faster! — than trying everything at once.
Alternatives:
- You can change the nuances by replacing moriturus with moriens or moribundus. I see no big difference in the overall message, but there is certainly room for personal preference and adapting to context.
- I chose the simplest possible translation of "went".
Depending on context, you might prefer to say that you fled or went into exile to the woods (ad silvam fugi) or that you lived in the woods (in silva vivebam/vixi) or something else (with e.g. latere or incolere or proficisci).
There is room for coloring this part of the translation with nuance.
I interpreted the English sentence as: "I went to the woods so that I would not have to regret on my deathbed not having lived."
If this is not the reading you intended to have, please edit your question to add details.