Is this an attempt to ground the wire?
Maybe historically, but no, the other way around: this should be used to ground the pipe. All metal pipes must be grounded or "bonded". It's important to ground them and make sure they are bonded to the ground of your electrical system and earth (see below)
Is it still grounded, despite the PEX, due to the water in the pipes acting as the electrical current?
The water cannot be relied on to act as a conductor. Whether that section of pipe is grounded depends on where the other end of the grounding wire goes to, or where the pipe goes to. The wire could lead to the panel's grounding.
You should check that and add a picture.
Should I tie it to a nearby junction box's ground wires instead, or leave it attached to the water line?
No, your junction wire's ground will not have the proper gauge leading back to the panel.
However, if it leads to the panel, and there is no other grounding of the panel (by means of a rod or plate) then this could be your old-style grounding. In that case, it should be replaced and upgraded.
and it properly ties into the water line elsewhere
That would be your grounding for that section of pipe.
Best to make sure you can fully trace all your bonding ultimately to a ground rod/plate and to the panel.