As others have said too i don't feel like this storyline is working out for the show.. it's too big for Castle, i.e. the cases involve national security, high ranking government officials and such. I see Castle with a bit more focus on smaller cases of everyday people in NYC.
Fortunately the seeds have been planted already for her leaving the Feds as she is not the compromising type when it comes to putting bad people behind bars. However, as a sidenote, to be fair to the SecDef.. he made a tactical decision to achieve mission success in a very high stakes mission (second only to catching/killing Bin Laden) and it "only" comes at the cost of a US operative. Call me cold but i believe the President would have decided similarly.
Anyway.. i think it'll take an episode or two more before she returns to NYC realizing that Fed work in Washington DC carries to much compromise for her to do it all her life. By that point she would have gotten it "out of her system", meaning she took her one in a lifetime chance and came to the conclusion that it wasn't for her which is all she may have wanted and needed. It's very good that Castle didn't push her to stay in NYC because that would have been an everlasting shadow on their relationship.
So depending on the general plot they now have a season to arrange the wedding and they still have to finish up the JB murder case by nailing the senator/governor (whatever he is).. depending on if they get a season 7 (ratings seemed to be holding at a good level) they might reserve the wedding and the conclusion for separate seasons or they might want to do big finishes in February sweeps and the season/show finale.