The last war fought by GDL and the Order was in 1422 but in 1431 they already were allied against Poland. The reason was the fact that the Order was seen as counterweight and potential ally against Poland, as I mentioned before relations between Poland and Lithuania weren't very friendly.