Answer:
Yes
Step-by-step explanation:
Current evolutionary hypothesis state that all plants share a common ancestor. However, throughout time, as plants needed to colonize other habitats to survive, they were forced to develop specific adaptations, for example, the development of seeds, which enables them to be spread (by wildlife) and colonize many habitats.
However, seedless plants, still require humid conditions. This is the case of ferns and mosses. These groups of plants didn't (or haven't) develop complete independence from water, therefore they still need to be close to moist areas.
Therefore, ferns and mosses indeed have a close relation to water plants. I would suggest an even closer one than those plants that have developed seeds and better adaptations to live their whole lives in land.