ok, you have several thousand options so there are a few things to bare in mind:
a 316 will not have / you will need to change to
51mm front suspension struts
correct springs/dampers
rear disc brakes
suitable fuel pump
cluster coding plug
prop shaft
major exhaust manifold modification (m52 tubular mani)
diff ratio/rating
smaller brake master cylinder
among 100 other things you may need to do you will have the amusing opportunity to recycle your 316 gearbox
there are endless sources to help you along every step of the way - the engine swaps /FI section is where you need to click