Examining the end of inflation with primordial black hole mass distribution and gravitational waves