Lemma: $2^{2\cdot 3^{n-1}}\equiv 1+3^n\pmod{3^{n+1}}$ for all $n\ge 1$.
Proof: We proceed with induction. Base case for $n=1$ is easy to verify. Suppose the lemma holds for some $n=k$. Then, by the inductive hypothesis $$2^{2\cdot 3^{k-1}}=1+3^k+3^{k+1}\ell,$$ for some $\ell\in\mathbf{Z}$.
Thus, $$2^{2\cdot 3^k}=1+3^{k+1}+3^{k+2}j\equiv 1+3^{k+1}\pmod{3^{k+2}},$$ for some $j\in\mathbf{Z}$, so by induction we are done. $\Box$
Now, suppose the original proposition holds for some $n=k$, so $2^{\varphi(3^k)}=2^{2\cdot 3^{k-1}}\equiv 1\pmod{3^k}$, and let $P=\operatorname{ord}_{3^{k+1}}(2)$. Then we have $2^P\equiv 1\pmod{3^{k+1}}$, so $2^P\equiv 1\pmod{3^k}$, so $2\cdot 3^{k-1}|P$. We also know that $P|\varphi(3^{k+1})=2\cdot 3^k$, so $P=2\cdot 3^{k-1}$ or $P=2\cdot 3^k$.
Then, by our lemma, $$2^{2\cdot 3^{k-1}}\equiv 1+3^k\not\equiv 1\pmod{3^{k+1}},$$ so we must have $P=2\cdot 3^k$, and the rest follows by induction. $\Box$