NATO chief warns Ukraine war could last 'months, even years'