We present experimental results on the sub-Doppler Rydberg spectroscopy of potassium in a hot cell and cold atoms, performed with two counter-propagating laser beams of 405 nm and 980 nm in the inverted ladder-type system (4S 1/2 -5P 3/2 -nS 1/2 and nD 3/2,5/2 ). Such an inverted laddertype scheme is predicted to be without sub-Doppler electromagnetically induced transparency (EIT) feature in a thermal ensemble under the weak-probe approximation. Instead, we chose a strong probe field beyond the weak-probe approximation, and successfully observed a transparency window with a width narrower than 50 MHz. Our all-order numerical simulation is in satisfactory agreement with the experimental results. This narrow linewidth allows us to measure the energy levels of the Rydberg levels from n=20-70 with improved accuracy. The deduced ionization energy agrees with the previous measurements. Furthermore, on the cold ensemble, our experiment studied the mechanism of the trap loss induced by the two-photon Rydberg excitation. We found that the dephasing loss induced by the dipole-dipole interaction dominates the trap loss while the detuning from the intermediate state ∆p ∼0 and the Rydberg state is occupied. Such a loss of the D state is stronger than that of the S state, because of its non-spherical symmetry. And, for ∆p >0 and nearly no population on the Rydberg state, the perturbation from the excitation fields results in a reduction of trap efficiency.