Difference between $\tt fft$ and $\tt dftmtx$ in MATLAB
Your resulting audioFile in the line audioFile= length(audioFile) / distortionPeriod; is a single number and not a vector signal.
And for this reason your audioFileFft and audioFileDftMat are computed from the processing of that number and not your initial signal vector in audioFile; which is not your intention. However if that line is for newLength, and this variable is an integer (i.e. initial audioFile length is multiple of distortionPeriod, here 512) then you can do this
audioFileFft = fft(audioFile, distortionPeriod, 2);  
audioFileDftMat = audioFile*dftmtx(distortionPeriod);

And the resulting norm(audioFileFft - audioFileDftMat) should be very small.