In Thor Ragnarok, Thor says the fight against Ultron was 2 years ago. So that puts Thor Ragnarok in 2017. Then in Infinity War, Iron Man says Thanos has been in his head for 6 years, after he sent an army to New York. So that puts Infinity War in 2018.
But Infinity War is supposed to take place directly after Ragnarok's end credit scene, and Ragnarok is set in 2017.
So is this a plot hole, or did Thor take months to try to get back to Earth? Someone please help me out, I've looked all over online, and can't find anything.