All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
You did not commit a sin by refusing that job. For all you know, Allaah could have wanted good for you by preventing you from it by the doubts and fears you had about it. So you should not be certain that the result of your Istikhaarah was that you should have accepted that job, even if it appears to be so.
One must have good thoughts about his Lord and be careful not to object to the predestination of Allaah, or not to have remorse and regret about something that was predetermined. A person should not be like the one about whom the Prophet said: “If only I did such a thing, such a thing would have happened, rather you should say: Allaah decreed such a thing, and Allaah does whatever He wills, because "if only" opens the door of the devil.” [Muslim]
As regards how to pray for Allaah to bless you with a better job than the one you rejected, the answer is that there is no specific formula for this. Instead, you may say any prayer you know in your language. The important thing is that you observe the conditions and proper conduct of supplicating, such as being persistent in your prayers and not being hasty.
To learn the conditions and proper conduct of supplication, please refer to Fataawa 88296 and 83421.
Allaah Knows best.