That statement simply isn't true. It's easy to construct an example of a non-conservative force which depends only on position, e.g.
$$\mathbf F(x,y) = \pmatrix{-y\\x}$$
In one dimension, any force which depends only on position is automatically conservative, but for higher dimensions this is not true. One can see why by trying to construct a potential energy function explicitly.
Consider a 2D system subject to a force $$\mathbf F = \pmatrix{-x\\-y}$$
We're looking for some $U(x,y)$ such that $\mathbf F = -\nabla U$, i.e.
$$\pmatrix{-x\\-y} = \pmatrix{-\frac{\partial U}{\partial x} \\ -\frac{\partial U}{\partial y}}$$
From the first component, we have that $\frac{\partial U}{\partial x} = x$; taking the antiderivative, it follows that $U(x,y) = \frac{1}{2}x^2 + C(y)$ where $C$ is an arbitrary function which may depend on $y$ but not $x$.
From the next component, we have that $$\frac{\partial U}{\partial y} = C'(y) = y$$
which implies that $C(y) = \frac{1}{2}y^2 + C_0$ where $C_0$ is a constant. Therefore, any potential energy function $U(x,y)= \frac{1}{2}x^2 + \frac{1}{2}y^2 + C$ produces the given force, and we can say that $\mathbf F$ is conservative.
The reason that this doesn't always work is that, while we can always find an antiderivative for the first component, we may run into inconsistencies in the others. The non-conservative force I wrote first is an example; if we try to apply the same procedure to that one, the first component will give us that $U(x,y) = xy + C(y)$, but the second will give us that $x + C'(y) = -x \implies C'(y)=-2x$. But since $C(y)$ cannot depend on $x$, this is inconsistent. There is no $U(x,y)$ such that $-\nabla U = \pmatrix{-y \\ x}$, and so the force is not conservative.