Your answer is actually identical to the book's solution (after accounting for $2n\pi$).

The key identity: $$ \frac{1}{2+\sqrt{3}} = 2 - \sqrt{3}.$$


Setting $w=e^{iz},$ we need to solve the equation $w^2-4iw-1=0.$ The solutions to this quadratic equation are $w=i(2+\sqrt 3)$ and $w=i(2-\sqrt 3).$

Let's deal with the first solution. We need to find $z=x+iy$ such that $e^{iz}= e^{ix}e^{-y}= i(2+\sqrt 3).$ This implies $\cos x =0.$ As you point out, that has solution set $\pi/2 + n\pi, n\in \mathbb Z.$ But there is another implication: In order to get $2+\sqrt 3$ as the imaginary part, we have to delete all $\pi/2 + n\pi$ for $n$ odd, as they lead to negative imaginary values. This is why we end up with $\pi/2 + 2n\pi.$

At this point, let's say goodbye to the original post for inspiration, as things are a little cloudy there. The easiest way to do this is write $e^{ix}e^{-y}=i(2+\sqrt 3)= e^{i\pi/2}(2+\sqrt 3).$ This tells us that $x= \pi/2 +2n\pi,$ and $-y= \ln(2+\sqrt 3).$

Solving for $z$ in the case $w=i(2-\sqrt 3)$ is the same. So in all, the solutions to the original problem are $z = (\pi/2 +2n\pi) -i\ln(2\pm\sqrt 3),n\in \mathbb Z.$