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