You can try putting the iPhone into DFU mode and see if that will let you restore and remove the jailbreak:
http://www.iclarified.com/entry/index.php?enid=1034
Some jailbreaks cannot be removed and in some cases will permanently disable your iPhone. If that happens to you, then you will have to buy a new iPhone; Apple will provide no support, warranty or out-of-warranty, for a jailbroken iPhone.
You're on your own from here. We can provide no further help with a jailbroken iPhone in these forums.
Good luck.