Access the session handling / management on your WebAppContext and set it.
WebAppContext app = new WebAppContext(....);
...
app.getSessionHandler().getSessionManager().setMaxInactiveInterval(timeout);
This is how Jetty itself does it.
Note: SessionManager.setMaxInactiveInterval(int)
is in seconds, not milliseconds.