Dynamics of an oscillating turbulent jet in a confined cavity