It is difficult to fully access the problems with the wood behind your door hinge without a picture to see the extent of the damage. None the less let me describe a reasonable repair technique that works well. I would skip the schemes of jamming additional wood sticks or slivers into the existing screw holes because these methods are stop gap measures at best and will not work when the damage is more significant.
One good way to deal with a problem like this is to remove the hinge from the door jamb and then bore out the problem holes with a larger diameter drill so that the sides of the hole are in clean solid wood. You may need to use a drill with a size of 7/16 or 1/2 inch diameter. The best type of drill bit for boring out the hole is one for the following types as they drill the best accurate hole size. These are called auger and brad point drills respectively.
Next you need some round hardwood dowel material that is sized to fit the holes you drilled out in the previous step. Common dowels are made of birch wood and come in 36 inch lengths.
Check the thickness of the door jamb and the space behind the jamb to the stud. Cut lengths of the dowel that are just a bit shorter than this measured length.
Apply yellow carpenter glue to the sides of the dowel and inside the drilled holes in the jamb. Then tap the dowel pegs into the holes so that they are nice and flush with the face of the jamb in the hinge cutout.
Give the glue a good amount of time to dry. Over night would be best. Next fit the hinge back into its position and mark the positions of the hinge holes. Remove the hinge and drill the proper sized pilot holes for the hinge screws. It may be best to use new screws for the hinge if the old ones are chewed up in the slots or the screw threads are not nice and sharp. If the dowel holes were drilled on center to the old screw holes the pilot holes should be going right into the dowel material. It is important to stress that the proper sized pilot holes are essential so that the screws will thread into the pilot holes properly without twisting off the screws.
With careful work and proper selection of the dowel size the finished hinge installation should completely cover up the rework area.
Some door jambs may be made of a material that does not suitably lend itself to gluing in a dowel pin. This would be the case for certain types of particle board and press board types of jambs. This would also be the case for jambs that are made of solid wood but may be splitting so that they cannot hold the dowel glue joint securely. An alternate fix using dowel pins may still be possible for these cases by using a modification of the technique that embeds the dowel into the stud behind the jamb. As long as the studs are made of wood and the existing hinge holes more than about 3/4 inch from the edge of the jamb this technique may work for you.
As seen in the above diagram the dowel pin hole is bored all the way into the wooden framing stud. The dowel diameter should be increased to 5/8" in diameter and careful placement of the hole drilling location done so that the drilled hole is contained entirely within the stud itself and not shaving into the back of the wall board. (Note that you can evaluate the wall board thickness by looking under the cover plate of a nearby electrical outlet or light switch). It may be necessary to offset the drill hole some from the center of the hinge screw hole. This would be OK as long as the later drilled pilot hole still engages into the dowel itself.
Cut the dowel pin slightly shorter than the drilled hole depth. Taper one end of the dowel slightly using sand paper so that it will enter the hole in the stud easily. As before smear glue down into the stud hole, the jamb hole and on the sides of the dowel pin. Pound the dowel into the stud till the end is flush with the face of the hinge cutout. Let fully dry and proceed to remount the hinge by drilling the pilot holes and installing the screws.
This technique takes care of the problem with the empty space behind the jamb. If you use the long screws approach you will find it problematic to tighten the screws securely due to this empty space. Over tightening the long screws will distort the already damaged door jamb and cause additional problems. (There is a technique, as has already been suggested, to fill this empty space using tapered wooden shims that can be purchased at home store but their use requires removal of the door casing so they can be installed). The embedded dowels can hold the hinge securely in place without the distortion of the door jamb.