Only a few miles....only a few feet... etc are not *durational* measurements but "completional" (maybe that word doesn't exist)  and as such are incompatible with the progressive/continuous. They're compatible with the perfect.


<sup>not OK</sup> The new skyscraper had been rising for only ten storeys when the steelworkers went on strike.

<sup>not OK</sup> I had been eating only three bites when I chipped a tooth.

<sup>not OK</sup> I had been taking only three sips when a fly landed in my glass.

<sup>not OK</sup> I had been climbing only three rungs when the ladder gave out.

<sup>OK</sup> I had been watching the show only three minutes when the TV went dark.

 
<sup>OK</sup> I had been taking that detour for only three weeks when the bridge was re-opened.