The prosecution wanted life in prison. The defense recommended 15 years. Ultimately, Khattala got 22 years in prison. The fact that the jury acquitted Khattala on the murder and attempted murder charges likely influenced the judge to issue a lower sentence. Khattala was convicted on conspiracy and providing material support to terrorism.
With gain time, Khattala will likely actually serve slightly more than 18 & 1/2 years., with credit for more than a year already served, which would further cut it to slightly over 17 years. He is 47 years old and will be around 64 at release, at which time he would be deported to Libya.