WARNING: This page is about a different car, the 2018 Jaguar XE and 2017 Jaguar XE. However, it is still accessible from the selected car via links, so may be relevant.
Remove the cover.
Open the Smart key with the emergency key.
Replace the battery, then re-assemble the Smart key.