The first one is: Voy a comprarlos (I'm going to buy them)
I'm going to=Voy
Buy them=Comprarlos (because is in plural)
The second one is correct
But it sounds better
"Juan va a entregarlos" or "Juan va a repartirlos"
Is up to you which one you want to use.
-Spanish speaker (my 1st language)