I don’t know if I have done something wrong or I didn’t. PS; I’ll write $\theta$ as $x$.
$$r = 4 \sin^2 \frac1{2x}$$ if you will graph it you will see it as an apple and it shows a symmetrical division from the $x$-axis. So the formula in finding the arc length is $$L = \int \sqrt{ (r’)^2 + r^2 } dx \\ r’ = 4 \sin \frac1{2 x} \cos\frac1{2 x}$$ and if we square it, it becomes: $$16 \sin^2\frac1{2 x} \cos^2\frac1{2 x}$$ so $r$ squared is $$16 \sin^4\frac1{2 x}$$
After integrating the whole thing the answer is $-8 \cos(1/2 x)$ limit from $0$ to $\pi$. I have solved for the upper half which goes from the origin up to pi and will multiply it by two but the problem is when I put the limits on. Here it is: $$-8\cos \frac{\pi}2$$ the answer is zero, and it is obvious it will make the whole answer zero. Is there anything wrong that I have done?
You are on the right track. The arc length is $$ L = \int_{-\pi}^\pi \sqrt{r^2(x) + r'^2(x)} \, dx = \int_{-\pi}^\pi \sqrt{16 \sin^4 \frac x2 + 16 \sin^2 \frac x2\cos^2 \frac x2} \, dx \\ = 4 \int_{-\pi}^\pi |\sin \frac x2| \, dx = 8 \int_0^\pi \sin \frac x2 \, dx $$ which seems to be what you already have. Your error is apparently in computing that integral: An anti-derivative for $ \sin \frac x2$ is $-2 \cos \frac x2$. The anti-derivative must be evaluated at both limits of the integral, and the difference taken. That gives the (expected) positive result: $$ L = 8 \bigl[ -2 \cos \frac x2 \bigr]_{x=0}^{x=\pi } \, = 8 (- 2 \cos \frac \pi 2 + 2 \cos 0) = 16. $$