1) Chisel out the old rotten wood and clean it out as best you can. Buy or rent a pressure washer to get all the mud out. Do this first and let everything be drying out while you get going on the next steps. Probably best that everything down there is "reasonably" dry before you seal it all up on step 4.
2) Buy GROUND CONTACT rated treated 1x4 from the lumber yard. Lowes and HD don't normally stock it, but they can order it for you. Or try a bigger lumber dealer. Typical treated 1x4 is not sufficient for this project.
3) Measure to each rebar dowel and notch your boards accordingly. You might also have to rip them down a tad on your table saw so they'll fit in the joint. Other option is to plane them thinner or you've got some belt sander time ahead of you.
4) Set the boards in place then top seal with the rubber sealant. Comes in a tube for your caulk gun.