When I run that code with your "ray with origin (0,0,0) and direction (5,0,1).unit" example, it returns 3.15979 for me. From what I can tell all the code you posted is correct. I imagine it's one of your other implementations that's causing the failure. It could be your unit vector calculation, your Vector.sub() method, Vector.dot() method, etc.
Try adding print statements throughout to see where it goes wrong. That's how I usually debug something like this.
Also I did a quick translation of your code into C++ (because I don't know java) that you can compare with if you like. It seems to function fine, which means that it's likely not your intersection function that is the problem.
My code is here: http://codepad.org/xldbJRKo
I hope this helps a little bit!