Of course it matters. You want to run the pump in the right direction. (DC motor science, the direction it runs is determined by the polarity. Get it wrong and you suck
)
There are different terminal sizes that are easy to see. And wire colors. Aftermarket fuel pumps just use wire terminals, not keyed connectors. And no, I will not spend over $300 for a fuel pump just because it has the right connector. It amazes me how many people will pay such huge money when a good fuel pump is under $40.