With the Google Nexus 4 being so old now, it does not come as a surprise that Google would decide to not offer it the new Android 6.0 Marshmallow update but it is not the end for the Nexus 4 yet.
You would be surprised to know that there are still a lot of Nexus 4 users around despite its age and because of that, custom ROM developers have come out with Marshmallow custom ROM for them to upgrade on their own.
There is currently two stable ROM out there to try. One created base on the one Dmitry Grinberg made and another made by Aldrin Holmes. Here is how you can upgrade your Nexus 4 using the custom ROM.
Transfer the TWRP file into the device and install/update it. Next, switch off the device and enter the Recovery Mode by pressing down on Volume up + Volume Down + Power Button at the same time.
Wait for the TWP UI to load and select Wipe > Factory Reset. Transfer one of the ROM-GAPPS files into the device and reboot to Recovery Mode once more. Install the remaining ROM-GAPPS, reboot one last time and you should be good to go.