Inlet valve for dishwasher came off. - Can I use JB weld on the compression fitting?
A compression joint that relies on any kind of sealant is a leak waiting to happen.
Sometimes the leak is very anxious to get started and begins dripping immediately. Other times the leak is patient and stealthy, waiting even weeks before POW! it soaks you and wreaks water damage everywhere.
Here are some things I've learned by experience:

the tubing must be bright clean and round where the ferrule will compress it
when tightening the nut ensure the tubing is very straight in the fitting. If it isn't the ferrule can be crimped onto the tube a little crooked.
don't over-tighten - IMHO a compression fitting takes less force on the wrench than a pipe thread fitting would. If it leaks under pressure you can tighten it a little more, but if that still fails, it'll have to be disassembled and inspected.

I suggest you disassemble the joint, carefully inspect all the parts for nicks, debris, and deformity, and replace parts as needed. In particular I'd consider cutting off the end of the tubing and try again with a new ferrule and meticulous cleaning of the tubing.