It depends on the hub you have. I'm guessing you're talking about a stock hub on an entry level mtb and likely to be cup and cone type bearings, if so it can't be converted to thru axle.
More expensive replacement hubs (Hope, DT Swiss, etc) which have cartridge bearings usually can be converted between quick release (100x9 qr) and non Boost (100x15 ta) easily with end cap conversion kits.
More expensive replacement hubs (Hope, DT Swiss, etc) which have cartridge bearings usually can be converted between quick release (100x9 qr) and non Boost (100x15 ta) easily with end cap conversion kits.