Did you just buy the phone? If, so you're probably on 3.1.3 and can't even JB to begin with.
Im not sure I understand your problem, but you can't even restore your phone? Try a DFU restore. Hold the Power and Home button for 10 seconds, then release the power button and hold onto the home button until iTunes recognizes a phone in recovery mode. (If it's already in recovery mode to begin with, you'll hear the sound of the device disconnecting, and the sound of it reconnecting.
Once in DFU mode (the screen will be all black, but itunes will recognize it) just restore to the lastest firmware. Since you haven't been Jailbroken before, you probably don't have an shsh stored on file, you'll be stuck on 3.1.3 until a jailbreak for that firmware is discovered. (or released 😉)