I think that's right, but here's the rest of the story. 2024 YR4 currently has a 4-year orbital period; it had close approaches in 2016 and 2020, and another is scheduled for 2028. But according to this
NASA website, the most likely upcoming collision possibilities are in 2032, 2039, 2043, 2047, 2074, and 2079. The ones after 2032 aren't multiples of 4 years. So NASA is evidently expecting the earth's gravity to have a huge effect on the
outgoing trajectory. It could reduce the orbital period by as much as six months.