All that the computer sensor does is to count the revolutions that the wheel makes. The hub makes exactly the same number of revolutions as the rim so it doesn't matter how high on the fork you mount it.
What does matter is how close the sensor is to the wheel magnet. Mount the sensor wherever it's necessary to get it to within a couple of millimeters of the wheel magnet.
One other thing. Mount your sensor on the front of the fork. That way if it ever gets bumped into the magnet the rotation of the wheel will push it out of the way rather than into the spokes.