The gap to the last spot for Champions League is 13 points, 12 points for the Europa League, or mathematically it is about 4-5 matches win.
With the fact that there are still 17 matches to go, mathematically Juventus is still having the chance to catch the position but ofc it is hard.
What Juventus need to do now is to try to win all the remaining 17 matches and hoping for the other team above their current position losing many points.
It is not impossible to happen but really hard to happen unless there will be miracles for them.

Mathematically, this is unrealistic. This is far from 4-5 games. 4th place averages 65% of possible points, which is almost 2 points per game. So if Juventus play perfectly and always take three points and all other teams play as usual, then Juventus will need 13 games to get to fourth place. At 17 games it looks sort of possible, but I think you'll agree that it only looks realistic in theory.
Juventus for the 4th spot realistically looking not possible but still have chance for the 6th which is in hands if they keep going like this because now mentality level is also change and players are not feeling good which is also big concern for them but as AC Milan and Atlanta are also falling behind things can happen for them into better end of this season even with this deduction because still they have enough quality and performance is also in their control specially as Vlahovic perform he is key player for them in this season until end and now any injury can ruin them badly for having spot into top six which is also not bad at all in these circumstances Massimiliano Allegri is also coming as brave and fighter leader in these conditions which is also good advantage for them.