Generally good advice, except the "window" of consideration is a bit wider, IMHO.
The variables to consider:
Pension - you MUST consider how long
(age + tenure) till you earn max contribution. See Chart below. Age alone matters too as experts advise moving to safety as we near retirement.
401 k - How WILL you invest? High risk vs safe, or some where in between? If you are an "all safe" kinda guy, you'll get very low returns. Far less that the 4%+ from Pension.
The extremes on either end are easy, I think. Anywhere in the middle, it gets personal, based on: individual situation/risk tolerance/current mix/time left.
If you are relatively young, the 401 k should win by a long shot, you get big match right away, riding long term gains, and (in all honesty) you might not work here long enough to get enough out of pension to offset the match from the get-go..
If it's a close call, I'd lean toward current pension/401 k mix, only because it's as safe as the safest 401 option & pays a lot more than that safe selection, Saving Trust II.