This is well-known, and can be found on the web. See for example http://faculty.csuci.edu/brian.sittinger/mordell.pdf
I only sketch the proof. Let $I=(x-\sqrt{-k})$ and $J=(x+\sqrt{-k})$, so that $IJ=(y)^3$.
One may show that $I$ and $J$ are coprime (this is a bit of work...)
By uniqueness of decomposition into produts of powers of prime ideals, $I$ and $J$ are cubes of some ideals. Write $I=(x-\sqrt{-k}))=K^3$.
Since the class group has no element of order $3$ by assumption, $K$ is principal ideal, i.e. $K=(z)$. We then have $z^3=\pm(x-\sqrt{-k})$ (units here are equal to $\pm 1$). A bit of algebra and the assumption on $k$ then shows that you have no solution.