Given your description, you've probably done the following already: \begin{align*} \nabla \cdot \mathbf A &= \frac{\mu_0}{4\pi}\int_V \nabla \cdot \left[ \mathbf J (\mathbf r') \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right] \, \mathrm{d}^3\mathbf r' \\&= \frac{\mu_0}{4\pi}\int_V \mathbf J (\mathbf r') \cdot \nabla \left[ \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right] \, \mathrm{d}^3\mathbf r' \end{align*} But since the quantity in square brackets only depends on the difference $\mathbf r -\mathbf r'$, we have $$ \nabla \left[ \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right] = - \nabla' \left[ \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right], $$ where $\nabla'$ now denotes the divergencegradient with respect to $\mathbf{r'}$. If you substitute this in and do an integration by parts, you'll get two terms. One of them (after applying the continuity equation) will be equal to $-i \omega c^2 \Phi$, while the other will be an integral over the boundary of the volume you're looking at. Assuming that our volume $V$ contains all of the current sources, the boundary term will vanish, and the Lorenz condition follows.