The Nokia 2 will get its last security patch in November of 2019 while Amazon-branded Nokia 6 in the US and India will get their last security patch in October 2019.
It's important to distinguish that we're talking about security updates, not major OS updates. It's unknown whether these phones will receive Android Q when it drops, but odds are slim given how far after their promised update window it falls.
HMD promises 3 years of security updates as part of its Android One program but only promised 2 years when it began launching Android phones back in 2017. It's nice that it's over-delivering on the promises made for the old phones, though.