It should have been
md = nlread("your_file.nc", MDTrajectory)[0]
md.writeToXYZ("export.xyz")
Note that the produced XYZ file is not 100% standard - for instance it writes Carbon instead of C and also contains the velocities. Nothing a bit of search and replace can't fix though :)