US department store operator JC Penney swung into a net loss in the third-quarter as the company was hit by restructuring charges and lower sales.