Maybe it just wasn't meant to be. I lost one 2 years ago at almost 19 weeks, don't blame yourself though. Sometimes this just happens. I still have no clue why I lost it. They did a d&c and could only tell me there was no growth. Now I'm 31 wks pregnant after that loss. You could always try again later.
I'm so sorry to read this. Please don't beat yourself up with the question of why or the "What ifs". Pregnancy is a fragile miracle. Take time to mourn and don't let this stop you in your journey for a child. Peace to you.