Permanent Secretary David Williams will leave this autumn, the Ministry of Defence has confirmed.