Yes that is true, it also seems that they will attack the closest planet of the player who the attack it directed toward. So if you are the one the pirates are after and you have one planet that is 2 jumps away from the pirate world and one that is 3 jumps, they will most likely go after the 2 jump planet.
Now if you have multiple planets that are the same amount of jumps away then you don't really know which one they will attack. I'm not sure if this is actually how pirates work when choosing which planet to attack but that seems to be the case when it comes to my games.