Riklaunim is right. But the spacer depends on your camera. With the ASI120MM, the depth (distance between M42 thread and sensor) is 12.5mm (C/S standard) while more recent cams (e.g. ASI224) have a depth of 17.5mm (C standard). My filter wheel acts as a spacer, but I'm expecting a big problem to adapt my future new ASI in 17.5mm. The back focus of a telelens is about 44mm (for Nikkor, Canon is shorter).
The telelens is attached to a vixen-standard dovetail with the help of two DIY rings (aluminium + threads and screws 120° apart). You can purchase a ring including an nikkor - M42 adaptor like this one:
http://www.teleskop-express.de/shop/product_info.php/info/p2837_Geoptik-Adaptor-for-Nikon-lenses-to-T2-for-CCD-cameras---w--1-4--thread.html
Some telelenses have a Kodak thread; in this case you'll only have to purchase a Nikkor/T2 adapter.
Mine is made out of spare adpaters (a bayonet from a film SLR, out of order) and a T2 spacer ring. I unscrewed the back part of the T2 adapter then I glued it with cyano on the back of the front part of the bayonet. Fortunately you'll easily find all necessary adapters at some dealers.
Nicolas