The song wouldn't necessarily have to be about JJ though, I think it was more of a name drop/ for comparison than anything, like she does with Elvis and Marilyn and etc etc.
There was a theory that I saw in a thread earlier that says that the Jim she's referring to in this song is Jim Jones, the cult leader of The People's Temple. I think it makes more sense for her to reference that in the context of the song rather than an actual lover.