It's hard to say for sure, but I strongly suspect it was named for the historic Palmyra in Syria. Most of the American settlements were only established (or renamed) after 1802 - skimming the WP articles, I get them as GA 1840, IL #1 1855, IL #2 unknown (but almost certainly later), IL #3 1814, IN 1839, ME 1807, MO 1819, NE 1870, NJ 1849, NY 1796, OH #1 1807, OH #2 1835, PA 1806-1810, TN unknown (but 1801 tax records mention Palmyra), UT 1852, VA 1814, WI 1846.
So only two of these are old enough to be the namesake of the ship Palmyra. But these were both far inland, so not likely to be closely involved with shipping, and neither had had that name for very long, so it was unlikely someone from there had moved to the coast, established a business, and named a ship after his hometown.
All the US towns named Palmyra that give a source for the name seem to have adopted it after the Syrian city; presumably it sounded nicely classical and faintly Biblical (even though the name itself isn't in the Bible, the city had associations with Solomon, etc). Given the wave of other things being named after it, it seems very likely this was the source of the name for the ship as well. But, of course, unprovable without a contemporary source.