Is there a way when an audio file is open in Sound Forge to search for the next gap or silence? If yes, can you specify the length, such as 2.3 seconds, etc.?
In all versions of SF Pro, go to "Tools> Find" and select the 'Glitch' preset, which has small-medium-large options, You can also fine tune it with Threshold and Sensitivity parameters. Add a 'Find' icon to the toolbar and/or a keyboard shortcut if you so desire,
I usually visually inspect the waveform for glitches... Dropouts, clicks, pops and other abnormalities are relatively easy to ID if you know what to look for 😜. Zoom in/out on the time with a mouse wheel or the up/down keyboard keys. Whilst holding the 'Shift' key, zooms the waveform's amplitude.
The 'Statistics' tool may be useful as well to ID where the minimum and maximum sample values are located.
I don't think AS has the 'Statistics' tool, but if may have a 'Find' feature, but I'm not sure, since I only used AS-12 briefly in beta testing.
You may be limited to a visual inspection of the waveform.. aside from listening of course, .. you could pause playback and fix or insert a marker or insert them on-the-fly. I think the "m" key inserts a marker in SF AS.,