The state said the lawsuit follows a years-long investigation by its civil rights division into Amazon’s treatment of workers at warehouses across New Jersey.