On the p-converse of the Kolyvagin–Gross–Zagier theorem