Seems like according to your ultrasounds, it would be your boyfriend.
you have to first back track and figure out when the first day of your last period was. when you figure that out, count fourteen days after. whoever you had sex with around that time is the father. women typically ovulate approximately fourteen days after the first day of their period...if your periods are normal.
Don't think there is any way that there would have been a heartbeat if you were pregnant from sleeping with your ex on May 18th. Don't usually hear one until close to 6 wks. Sounds like the dates would be right on for it to be your boyfriend's. I wouldn't stress yourself too much about this. I doubt if they would be off a whole month. Good luck.
Well it sounds like the the boyfriend is the baby's daddy. I hope he is the one you wished for.