Look thru this mulptle places there are pix of fittings.
https://www.greatgrady.com/threads/deck-drain-scupper-surprise.28979/
So, your cockpit drain has a 90 elbow 1- 1/2 to Barb to Female thread. You need to buy a deck drain flush fitting and
cut off the barb and just use the thread.
Then you hold the female elbow (with hose alreay attached) in place underneath and then from top of deck, screw the drain fitting down into the female thread.
I had a hard time finding one that truly sat flush so I dremel-tooled it to work.
There are Nylon, Marelon, SS, and chromed plastic versions of these. The key is to find the one that fits your hole and the elbow thread.
Someone posted a matched pair (elbow and deck drain) with SS top. It was not the correct hole size for me