Jaguar Land Rover (JLR) has confirmed plans to cut 4,000 jobs.