You are using L'Hopital's rule to find a derivative (at $0$). That is, you are using a non-trivial theorem asking to compute 2 derivatives (that of $f$ and that of $g$, applying L'Hopital to something like $\frac{f}{g}$) on a neighborhood around $0$, in order to find one (that of $f$ only) at the single point $0$.
This is overkill.
Define the function $f$ by $f(x) = e^{2\sin x}$ for $x\in\mathbb{R}$. Note that $f(0) = 1$.
Then,
$$
\lim_{x\to 0}\frac{e^{2\sin x}-1}{x} = \lim_{x\to 0}\frac{f(x)-f(0)}{x-0}
$$
and this is the definition of $f'(0)$ (if it exists). But it exists: by composition, $f$ is differentiable on $\mathbb{R}$, and $f'(x) = (2\cos x)e^{2\sin x}$, so $$f'(0) = 2$$.
No need for L'Hopital.
As for why your attempt failed: let $u(x)=2\sin x$. Then indeed $u(x)\to 0$ as $x\to 0$. That means $\lim_{x\to 0} \frac{e^{u(x)}}{u(x)}=1$, though, not $\lim_{x\to 0} \frac{e^{u(x)}}{x}=1$. So you need to rewrite
$$
\frac{e^{u(x)}}{u(x)} = \frac{e^{u(x)}}{x}\cdot \frac{x}{u(x)}
\xrightarrow[x\to0]{} 1\cdot \lim_{x\to0}\frac{x}{u(x)}
$$
which will give you the right answer.