how can i instantiate a GameObject in mouse position and in a special distance from the camera?

i want to instantiate a GameObject in mouse position and i can use camera.ScreenToWorldPoint or ScreenPointToRay methods for finding the world position. i can not use raycasting in my situation. so i need a method to find what is the world position of mouse in (for example 100m away) from the camera position. because camera view is perspective and the view is a cone some calculations are needed. as i know i should take the difference of mouse position from center, into account and use the fieldOfView value to find the angle of the line that i should go on to find the position but i can not produce working code. my code is like this inside Update() function.

 if (Input.GetMouseButtonDown(0))
        {
            Vector3 a = Camera.main.ScreenToWorldPoint (new Vector3 (Input.mousePosition.x,Input.mousePosition.y,0));
            a.z = 0;
            print(a.z.ToString());
            Instantiate (fairy,a,Quaternion.identity);
        }

the camera is placed at (0,0,-10) and i want to create fairies at z position of 0.

i have a related question as a featured question too.

Use Camera.ScreenToWorldPoint.

To use it, you provide it with a Vector3. The X & Y components of the Vector3 represent the pixel coordinates, measured from the bottom-left of the screen. The Z component represents the distance from the camera in world-units.

For example:

// instantiate an object at the mouse's position, at 20 units away from the camera
var screenPos = Input.MousePosition;
screenPos.z = 20;
var worldPos = camera.ScreenToWorldPoint(screenPos);
var newInstance = Instantiate(prefab, worldPos, Quaternion.identity);

duck's answer is correct. thank you man! i write this for clearification. i read the docs carelessly. it says that the third argument of ScreenToWorldPoint method should be the z's distance from camera and not in world/scene space. so when my camera is at z of -10, 0 means 10 meters away from the camera and code be like this.

if (Input.GetMouseButtonDown(0))
        {
            Vector3 a = Camera.main.ScreenToWorldPoint (new Vector3 (Input.mousePosition.x,Input.mousePosition.y,10));
            Instantiate (fairy,a,Quaternion.identity);
        }