You’ll have to claim and recheck your bags after clearing immigration and customs at JFK. Rather than dumping them back on the belt outside the customs hall, ask an agent to list you for standby on your desired flight. If you clear, the bags go with you. If not, they go on your original flight.
Once you’ve already surrendered your bags, often the answer is no if you ask for standby later.
Should be free, but I’ll let the others speak to that.