What is (probably) the closest living relative of the trilobite?
There were so many species of trilobites for 300 million years, so perhaps some trilobites species are closer to horseshoe crabs whilst others are closer to woodlice, some trilobites were amphibious and could walk onto the seashore. 

If you check this research about horseshoe crabs, there are a dozen fossils that are hybrids between a trilobite and a horseshoe crab, i.e. bellinatus trilobitoides.

 From the family tree you can see some early horseshoe crabs:


this is a harpetida trilobite:


The morphology of the fossils is mostly saved as dorsal morphology and ventral morphology. from the top the are similar to horseshoe crabs, and the different legs are similar to woodlice and bathynomus and horseshoe crabs in different fossils: 


There are other living animals that resemble them like Serolina Delaria:

Tadpole Shrimps:

That's from this cool page with images of lots of things like trilobites. 
Silverfish:

Bathynomus, similar to woodlice:

The videos of bathynomus are cool: https://www.youtube.com/watch?v=jfnHQPkta-Q