Miscarriage and TTC

I recently had a miscarriage.We had been trying for one year.  I was 12 weeks and they did a routine ultrasound and found no heartbeat. The baby measured 9w 3d. So i technically lost it 6 weeks ago. Had a d&c 3 weeks ago. Now we are trying again. We were told we could try again now. Has anyone ever had this experience and how long did it take for you to get pregnant again?