Voltage Limitations of a header being used as a voltage selector
The datasheet for your part shows that the pin width is 0.63mm (25 mils).  Typically one would over-size the hole on the board by 10 mils (so 35 mils) and then add an annular ring of at least 10 mils.  So the overall pad for each pin is probably a 55 mil circle.
Given that the connector pitch is 100 mils, that leaves 45 mils of pad to pad spacing on the PCB.

What Physics says
The breakdown voltage of air is nominally 3kV per mm.
https://en.wikipedia.org/wiki/Electrical_breakdown#Liquids
Given the 45 mil spacing calculated above, nominally you won't get an arc until you hit 3.3kV.  But keep in mind that is going to vary with humidity and air pressure.  Additionally, you can start to ionization and corona discharge well below that voltage.
So from a physics standpoint, there is a good chance you won't get an arc at 1000V using 45 mil spacing.  But from a safety standpoint you should probably increase the spacing.
What the standards say:
IPC2221B Table 6-1 says that the minimum recommended PCB trace clearance for 1000V is 0.2&quot; if the board is not coated, and 92 mils if its coated.
So according to industry standards 45 mils would not be sufficient clearance for 1000V.
These standards were designed to create safe products.  Its a good idea to follow them.
You might be able to use some sort of cheap PCB mount jumper for this, but just not a 100 mil header.
You could try a reed relay.  Many of them are rated to over 1000V load voltage.
https://www.digikey.com/en/products/filter/reed-relays/964
Another safe option might be a switch rated for at least 1000V.