Since 2016-12-28, the «var/generation» folder has been renamed to «generated/code» in Magento 2.2

https://github.com/magento/magento2/commit/3d13c9bd#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780

See also:

How to fix the «Can’t create directory var/generation» issue?