When you say "it is not periodic and declining to zero", I assume you mean
"and NOT declining to zero".
For a non-periodic transient you can pad with background values, zeros in
your case, so that the total number of points equals a large power of 2.
The FFT of this extended signal is still blindingly fast, and the result
approximates the frequency spectrum of an isolated transient.
However(!), if your transient has NOT declined to zero, then the FFT will
introduce artificial amplitudes at all frequencies because of the step
function from the end of the measured transient suddenly down to zero.
The resulting frequency spectrum is now contaminated with a non-constant
baseline offset.
It would be best if you could measure the full decline of the excitation down to background (zero) values, then pad with zeros...