It’s really most likely just a nemertea. If you google “green nemertea” you’ll see similar ones, and according to wikipedia “Although most are less than 20 centimetres (7.9 in) long, one specimen has been estimated at 54 metres (177 ft) The smallest are a few millimeters long,[11] most are less than 20 centimetres (7.9 in), and several exceed 1 metre (3.3 ft) The bodies of most nemerteans can stretch a lot, up to 10 times their resting length in some species” so it’s length really isn’t all that strange.
It probably is something in the phylum, but there are many types of nemertean worms. Some excrete mucus on their outsides so they can slide through things better, some excrete a paralyzing slime that kills prey. Some can regenerate, while others can split into two different worms. Some live in water, some can shrink when threatened. Some are predators, some are parasites… who knows what all this thing can do, or even how to class it.