If the colliders are 2D colliders, use Physics2D.Raycast
If you don't use the new Unity 2D system, we can't help you much. Perhaps you arent in the right Z layer. Also Vector3.forward seems not very good. Try to use transform.forward.
I hope I helped you!