What is wrong with your answer?
I am going to write an answer explaining why your solution is wrong, because I don't think a comment would be enough. First, I am going to make a change of variable. You used the variable $r$ to refer to the distance from the axis of the cylinder. I feel more comfortable using the symbol $x$ for this variable, so that is what I am going to. The reason I fee more comfortable with this choice is because you don't integrate over cylindrical shells of radius $r$; you integrate over surfaces of constant $x$.
Anyway, let's look at what you did. Your equation $$dV = 2L \sqrt{R^2-x^2}dx$$ is correct. This is great so far.
The next equation I want to look at is
$$dm = \frac{2M}{\pi R^2}\sqrt{R^2-x^2}dx.$$
Notice you forgot the $dx$ in your original question, but its obvious that is what you meant. Now let's think about what this equation means. It means that the mass in the surface of constant $x$ of width $dx$ is the $dm$ given by the equation. This equation is also totally fine, but it isn't as useful as you think.
I do have a problem with your next equation. Your next equation is
$$I = \frac{2M}{\pi R^2}\int x^2 \sqrt{R^2-x^2}dx.$$
The reason I have a problem with this equation is that it is really saying $I=\int x^2 dm /M$, but of course we know that it should be an $r$ instead of an $x$: $I=\int r^2 dm /M$. The reason this distinction is important is because your surfaces of constant $x$ are not surfaces of constant $r$. Now we can't fix this problem by just writing
$$I = \frac{2M}{\pi R^2}\int r^2 \sqrt{R^2-x^2}dx$$
because each surface of constant $x$ is not at a well-defined $r$: the part of the surface near the surface of the cylinder has $r=R$, but the part in the middle of the surface has $r=x$. So the integral above doesn't make sense.
Correct way to get the answer
There are two ways to find the answer then. One way is just to write out the integral in rectangular coordinates and the other way is to use the parallel axis theorem to find the moment of inertia of each surface of constant $x$ and the integrate over constant $x$.
First way of getting the answer
Let's look at the first method first. We get the following expression for the moment of inertia:
$$I = \frac{M}{\pi R^2}\int^R_{-R} \int^\sqrt{R^2-x^2}_{-\sqrt{R^2-x^2}} (x^2+y^2) dy\,dx $$
Doing the inner integral, you get
\begin{equation}
\begin{aligned}
I &= \frac{2M}{\pi R^2}\int^R_{-R} \left(\frac{4}{3} R^2 + \frac{2}{3}x^2 \right) \sqrt{R^2-x^2} dx \\
&=\frac{1}{3} \frac{2M}{\pi R^2}\int^R_{-R}R^2\sqrt{R^2-x^2} dx+\frac{2}{3} \frac{2M}{\pi R^2}\int^R_{-R}x^2\sqrt{R^2-x^2} dx
\end{aligned}
\end{equation}
Now you have already evaluated the integral in the second term in your question. The integral in the first term is easy because it is just the area of a semicircle. So we get
\begin{equation}
\begin{aligned}
I &= \frac{1}{3} \frac{2M}{\pi R^2} R^2 \pi R^2/2 +\frac{2}{3} \frac{M R^2}{4} \\
&= MR^2/2
\end{aligned}
\end{equation}
Second way of getting the answer
Now let's look at the second way of getting the answer. This time we will just calculate the moment of inertia of each surface of constant $x$ and add them up. We could find in a table that the moment of inertia of a rectangle of width $2\sqrt{R^2-x^2}$ and mass $dm$ about its center of mass is $\frac{1}{3} dm \left(R^2-x^2\right).$ But we are more interested in the moment of inertia about the origin when this surface of constant $x$ is displaced a distance $x$ from the origin. Using the parallel axis theorem, we find that the moment of inertia is $\frac{1}{3} dm \left(R^2-x^2\right) + dm x^2$. This is the moment of inertia of each surface of constant $x$. Adding these up we get the total moment of inertia:
$$I = \int dI = \int \frac{1}{3} dm \left(R^2-x^2\right) + dm x^2 = \int \frac{1}{3} R^2 dm + \frac{2}{3} x^2 dm.$$
Now plugging in our expression for $dm$, we get that $$dI = \frac{2M}{\pi R^2} \int_{-R}^R \frac{1}{3} R^2 \sqrt{R^2-x^2} + \frac{2}{3} x^2 \sqrt{R^2-x^2} dx.$$
This is the same expression we got from the first way of computing the moment of intertia. So this will give us the correct answer. Also, we can see that the $y$ integral of the first method just gave us the moment of inertia of each surface of constant $x$.
I should add that the easiest way to get the moment of inertia is to integrate over surfaces of constant $r$ (where $r$ is the distance from the axis of the cylinder. You get that $dI = r^2 dm$ where $dm = \frac{M}{\pi R^2} 2 \pi r dr.$ So then you get $I = \int dI = \frac{M}{\pi R^2}\int_0^R r^2 2 \pi r dr = \frac{2 M}{R^2} \int_0^R r^3 dr = MR^2 /2$
If you do the calculations, you get that the Moment of inertia of a cilinder it's
$$
I=\rho\int_{z_1}^{z_2}\int_0^{2\pi}\int_0^R r^3drd\theta dz
$$
With
$$
\rho=\frac{M}{V}=\frac{M}{h\pi R^2}
$$
Half of the cilinder means that $\theta$ goes from $0$ to $\pi$. Also you conserve the density.
Since there is no angular dependence, it's just the half of the Moment of inertia of the initial cilinder.
Best Answer
Obviously $J$ is something different from $I$ because the units would be different. OTOH, they are related. Consider this idea and see if you can see what their relationship is.
The mass of the cylinder is given by $m = \rho V$, and the volume of a cylinder is $V=LA$, where $L$ is the height (or length) of the cylinder and $A=\pi r^2$, the cross sectional area.
I think you can take it from there to find the connection.
EDIT: J is the polar moment of inertia of the area, not the mass. $$ J=\int r^2 dA $$