Yep, that's right. That's the standard way to measure distance between two points in 3D space. Since you seem to be new to 3D math, you should check out vectors and matrices.
I am very new to 3d math in concept. I am not new to programming though. Most of the math I've done in code has involved business logic. I've taken an interest in 3d graphics only recently. I've been considering attempting to learn how to code with a 3d engine, but before doing that, I thought it'd be best to learn the basics first. That link to vectors and matrices is pretty much where I am at on the learning curve thus far.