Hi Pijush,
Chateau Fontainebleau would be about 30 min. walk from the train station (which is on the border of Avon & Fontainebleau), but there is a bus that leaves directly from the train station and arrives right next to the Chateau, costing 1,60€ (uses regular
Metro ticket t+ tickets, which you can buy from the driver or any ticket seller/machine in Paris).
Once you arrive at Fontainebleau and cross underneath the tracks to arrive at the front of the station, to the right there will be several buses showing Line 12, A, B and C. I believe lines A and B will both pass in front of the chateau. The electronic sign at the front, top of the bus will show you which route it is taking and the major destinations (such as Chateau).
Hope this helps,
Ben