Open the Dialer/Phone application and dial (STAR)#(STAR)#4636#(STAR)#(STAR), then select Phone Information and scroll down to Set preferred network type and change the drop-down to LTE only.
Be aware that with few exceptions, like T-Mobile's VoLTE, that in LTE only mode, you will not be able to make or receive phone calls or text messages. 2G/3G/HSPA(+) is required for voice calls and SMS in most GSM/LTE networks.
Also, be careful with using terms like 4G and LTE... depending on your carrier these might be interchangeable, or some carriers use "4G" to mean HSPA+ and "LTE" to mean, well, LTE service, some carriers use "4G" to refer to both/either HSPA+ & LTE, and some others use "4G" to mean only LTE.
In common practice for most users, 2G refers to Edge, 3G refers to GSM, and 4G refers to HSPA/HSPA+ and not LTE service.