Transmission or computer problem?

Three or four months ago, I was driving down the highway when my 2004 Trailblazer seemed to lose accelleration for just a few seconds. The next few seconds it recovered…for just a few seconds… And again it seemed to be just coasting. I tried depessing the accelerator but it acted like it was in neutral. I pulled off to the side of the road, called my husband to come get me, but it took him quite a while and so I tried putting the shift in 3rd gear to see if I could get it to move…it did and I drove home in third gear. I didn’t drive for a few days but decided to see what would happen if I drove just around our block. It ran perfectly. I have been driving daily with no more instances