Before I knew it I didn't know what I wanted to do.
「気づいたら」「気がつくと」を英語にすると I realized または Before I knew it という言い方があります。「やりたいこと」は what I want to do ですが、その当時の話なので過去形となり what I wanted to do(やりたかったこと)となります。「分からなくなっていた」は I didn't know です。
ですので、
I realized I didn't know what I wanted to do.
Before I knew it I didn't know what I wanted to do.
という言い方があります。どうぞご参考に!
I came to the realization that I had no idea what I wanted to do after graduating from university.
この場合、次のような言い方ができますよ。
ーI came to the realization that I had no idea what I wanted to do after graduating from university.
「大学卒業後、自分が何をしたいのかわからないということに気がついた」
to come to the realization で「〜ということに気づく」
ご参考まで!