Jaguar Land Rover Ltd. said it intends to build electric cars in the U.K. if the government can overcome shortfalls in available energy and infrastructure investment, potentially giving Britain a manufacturing boost as it leaves the European Union.