Search for nearby stars among proper motion stars selected by optical-to-infrared photometry - III. Spectroscopic distances of 322 NLTT stars