Always try to keep it 1 interaction per cycle of the onLoop. So to do that here you can do as the guy said above by reversing the order.
if (getInventory().contains("Jug")) {
log("Dropping");
if (getInventory().dropAll("Jug")) {
ConditionalSleep2.sleep(1200, ()-> !getInventory().contains("Jug"));
}
} else if (getInventory().contains("Jug of wine") && myPlayer().getHealthPercent() <= 60) {
log("Drinking");
if (getInventory().interact("Drink", "Jug of wine")) {
//Depends on your needs but you can sleep or not here
ConditionalSleep2.sleep(1200, ()-> myPlayer().getHealthPercent() > 60);
}
}
But if you want it purely done after drinking then you will have to do it Heiz way or put the check and dropping of "Jug" at the top of your onLoop.
P.S.
Reason it ignores the Jug btw is because every game tick is ~600ms, so when you drank the wine you were also checking for Jug on the same game tick. It would take a game tick for the game to make the wine go from Jug of wine to Jug.