Not sure you have to ‘upgrade’ to 1.6. I’m running L4T-R28.2-DP, but check what gives:
gst-launch-1.0 version 1.8.3
Not sure why you don’t want to use mkv, but you may also use MPEG-2 Transport Stream with mpegtsmux:
gst-launch-1.0 -e nvcamerasrc ! 'video/x-raw(memory:NVMM), width=640, height=480' ! omxh265enc ! mpegtsmux ! filesink location=a.mp2
Stop it with ctrl-C before it fills your disk. Right-click/Properties/Video on the file with nautilus (ubuntu file explorer) and you’ll see MP2TS as container.
AFAIK, you can only use matroska or mp2ts as container for h265 from gstreamer. For h264, you can also use quicktime container with qtmux.