First check Google Flights to look for easy connections - an open jaw into Ljubljana out of Dubrovnik.
If that doesn't yield anything, try into Venice out of Dubrovnik. It's a 2-3 hour shuttle ride direct from Marco Polo airport in Venice to Ljubljana. You might find a direct flight into Venice from New York. Also check flying into Zagreb, out of Dubrovnik. If you had planned to rent a car, picking it up in Zagreb after flying in, driving to Slovenia, then driving back down to Dubrovnik makes sense: a car picked up and returned in the same country is usually a lot cheaper than renting in Slovenia returning in Croatia - a steep one-way fee is often incurred.
You may have to stage in cities like Amsterdam, Paris, Frankfurt, or London and book separate flights to/from Slovenia and Croatia. Or, doing that may save you some money. Obviously from New York you have a lot of direct flight options. Look for direct flights from those staging cities to/from Ljubljana and Dubrovnik too. It's a bit of manual work - maybe SkyScanner will make it easier if you try them. FYI, there are also some direct flights Dubrovnik to Venice (some days), in case you are able to stage there.