need to "speckulate" too much on the specific issue, but I thing you were wise to do that. Water quality is the usual culprit. (And when the timers come on today, oh man do I need to do water changes rather than sit around telling others to do that!)
If you are edgy about the Java moss, you could take clean soap-less wide mouthed pickle jar (which you just happen to have around the house or a gallon or half gallon bowl (the pickles would have been cheaper). Take a teaspoon of alum and a tiny bit of HOT water. Slosh the alum (almost said alumna) around until it finally dissolves. Fill up the rest of the gallon with "room temperature" water. The finger thermometer will work fine for this purpose,
Soak the submerged fern for 45 minutes. (If you can get away with 1/2 gallon, make a half recipe.) The rinsed it thoroughly a couple of times. Most and hopefully all snails, leaches, fish eggs and disease organisms will be dead.
If you are in a hurry, dissolve a tablespoon in the dollop of hot water, add the rest of the water and leave the plant 20-25 minutes. One of our drug stores had it. The other one probably did but I didn't have the sense to immediately ask a staffer where the alum was. ;)
I think you will love the Java fern(s). I have a thicket of the fine leafed stuff which, after several years and good lighting, is now filling and growing out of a 10-gallon tank. There are a couple of other tanks where the fish are begging me to move some of the Java moss. ;)
If a frond (fern leaf) is obviously dead, remove it. If there is a little green still there, it is unsightly, but you might want to leave it alone. Often those yucky things will generate little fernlets. While I suppose Java ferns, when growing out of the water in a tightly covered tank - with the attendant high humidity - might form spores - it is far, far easier to reproduce them and most aquarium plants vegetatively.