BC140 Server Instance doesn’t start: Object reference not set to an instance of an object.

Server instance: BC140
Tenant ID:
User:
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.Heartbeat.WriteHeartbeatToServiceInstanceTable()
at Microsoft.Dynamics.Nav.Runtime.PeriodicScheduler.RunAction()
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2147467261
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.Heartbeat.WriteHeartbeatToServiceInstanceTable()
at Microsoft.Dynamics.Nav.Runtime.PeriodicScheduler.RunAction()

Cause: the server instance is connecting to an NAv 2017 database which isn’t correct.
Resolution: configure the server instance to connect to a BC14 database.